[FFmpeg-cvslog] Merge commit '78489822074096e3ae0f3c3b70accace955086f6'
Clément Bœsch
git at videolan.org
Sat May 20 17:50:59 EEST 2017
ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Sat May 20 16:44:58 2017 +0200| [091c9860559e4d33179747c5d651bc9e31bd76eb] | committer: Clément Bœsch
Merge commit '78489822074096e3ae0f3c3b70accace955086f6'
* commit '78489822074096e3ae0f3c3b70accace955086f6':
configure: Place all temporary files in one separate directory
Merged-by: Clément Bœsch <u at pkh.me>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=091c9860559e4d33179747c5d651bc9e31bd76eb
---
configure | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/configure b/configure
index f377b480dd..aa89d2d1d8 100755
--- a/configure
+++ b/configure
@@ -3771,19 +3771,23 @@ elif ! check_cmd mktemp -u XXXXXX; then
# simple replacement for missing mktemp
# NOT SAFE FOR GENERAL USE
mktemp(){
- echo "${2%%XXX*}.${HOSTNAME}.${UID}.$$"
+ tmpname="${2%%XXX*}.${HOSTNAME}.${UID}.$$"
+ echo "$tmpname"
+ mkdir "$tmpname"
}
fi
+FFTMPDIR=$(mktemp -d "${TMPDIR}/ffconf.XXXXXXXX" 2> /dev/null) ||
+ die "Unable to create temporary directory in $TMPDIR."
+
tmpfile(){
- tmp=$(mktemp -u "${TMPDIR}/ffconf.XXXXXXXX")$2 &&
- (set -C; exec > $tmp) 2>/dev/null ||
- die "Unable to create temporary file in $TMPDIR."
- append TMPFILES $tmp
+ tmp="${FFTMPDIR}/test"$2
+ (set -C; exec > $tmp) 2> /dev/null ||
+ die "Unable to create temporary file in $FFTMPDIR."
eval $1=$tmp
}
-trap 'rm -f -- $TMPFILES' EXIT
+trap 'rm -rf -- "$FFTMPDIR"' EXIT
tmpfile TMPASM .asm
tmpfile TMPC .c
======================================================================
diff --cc configure
index f377b480dd,a46e670ecd..aa89d2d1d8
--- a/configure
+++ b/configure
@@@ -3775,15 -2965,17 +3777,17 @@@ elif ! check_cmd mktemp -u XXXXXX; the
}
fi
-AVTMPDIR=$(mktemp -d "${TMPDIR}/avconf.XXXXXXXX" 2> /dev/null) ||
++FFTMPDIR=$(mktemp -d "${TMPDIR}/ffconf.XXXXXXXX" 2> /dev/null) ||
+ die "Unable to create temporary directory in $TMPDIR."
+
tmpfile(){
- tmp=$(mktemp -u "${TMPDIR}/ffconf.XXXXXXXX")$2 &&
- (set -C; exec > $tmp) 2>/dev/null ||
- die "Unable to create temporary file in $TMPDIR."
- append TMPFILES $tmp
- tmp="${AVTMPDIR}/test"$2
++ tmp="${FFTMPDIR}/test"$2
+ (set -C; exec > $tmp) 2> /dev/null ||
- die "Unable to create temporary file in $AVTMPDIR."
++ die "Unable to create temporary file in $FFTMPDIR."
eval $1=$tmp
}
- trap 'rm -f -- $TMPFILES' EXIT
-trap 'rm -rf -- "$AVTMPDIR"' EXIT
++trap 'rm -rf -- "$FFTMPDIR"' EXIT
tmpfile TMPASM .asm
tmpfile TMPC .c
More information about the ffmpeg-cvslog
mailing list