diff options
author | Clément Bœsch <u@pkh.me> | 2017-05-20 16:44:58 +0200 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2017-05-20 16:47:20 +0200 |
commit | 091c9860559e4d33179747c5d651bc9e31bd76eb (patch) | |
tree | a7decc140f337154002b0b8dff6f790a56d304de /configure | |
parent | e78dc57888d1468b4f156581ec7039d2eda91783 (diff) | |
parent | 78489822074096e3ae0f3c3b70accace955086f6 (diff) | |
download | ffmpeg-091c9860559e4d33179747c5d651bc9e31bd76eb.tar.gz |
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-x | configure | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -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 |