summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitrij D. Czarkoff <czarkoff@gmail.com>2015-03-25 23:58:05 +0100
committerwm4 <wm4@nowhere>2015-03-26 14:33:21 +0100
commita01b6d99e548e94e5cfe2f9bbf5daa5a8a52f745 (patch)
tree0a1f32b7e280d883b5cf85e46d51f55703e62d69
parente4e27882e722a4e8fa50b3e514088624f5b6a32e (diff)
downloadmpv-a01b6d99e548e94e5cfe2f9bbf5daa5a8a52f745.tar.bz2
mpv-a01b6d99e548e94e5cfe2f9bbf5daa5a8a52f745.tar.xz
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>
-rwxr-xr-xold-configure2
1 files changed, 1 insertions, 1 deletions
diff --git a/old-configure b/old-configure
index 0b018d81d7..e72f7c8504 100755
--- a/old-configure
+++ b/old-configure
@@ -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