mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
old-configure: BSD-compliant use of mktemp
Mktemp on BSDs (at least on OpenBSD) don't have "--tmpdir" option.
Set temporary directory to /tmp by default. Use of ${TMPDIR:=/tmp} allows
overriding temporary directory via environment if needed. (And is indeed needed
in OpenBSD ports infrastructure.)
Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
@@ -324,7 +324,7 @@ test -z "$_bindir" && _bindir="$_prefix/bin"
|
||||
test -z "$_mandir" && _mandir="$_prefix/share/man"
|
||||
test -z "$_confdir" && _confdir="$_prefix/etc/mpv"
|
||||
|
||||
mplayer_tmpdir=$(mktemp -d --tmpdir mpv-configure-XXXX)
|
||||
mplayer_tmpdir=$(mktemp -d -p ${TMPDIR:=/tmp} mpv-configure-XXXXXX)
|
||||
test -n "$mplayer_tmpdir" || die "Unable to create tmpdir."
|
||||
trap 'rm -rf "$mplayer_tmpdir"' EXIT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user