mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 08:37:59 +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:
parent
e4e27882e7
commit
a01b6d99e5
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user