Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2017-05-20 17:44:58 +0300
committerClément Bœsch <u@pkh.me>2017-05-20 17:47:20 +0300
commit091c9860559e4d33179747c5d651bc9e31bd76eb (patch)
treea7decc140f337154002b0b8dff6f790a56d304de /configure
parente78dc57888d1468b4f156581ec7039d2eda91783 (diff)
parent78489822074096e3ae0f3c3b70accace955086f6 (diff)
Merge commit '78489822074096e3ae0f3c3b70accace955086f6'
* commit '78489822074096e3ae0f3c3b70accace955086f6': configure: Place all temporary files in one separate directory Merged-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files 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