From 17d031f88c1191e060d8cf23877eefdd47e4bbf3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 26 Sep 2014 13:53:20 +0200 Subject: old-configure: minor improvements Use a trap to remove the temp dir on exit. Write config.log to old_build instead of the top-level dir. --- old-configure | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'old-configure') diff --git a/old-configure b/old-configure index c216d4f882..a0cd853a6d 100755 --- a/old-configure +++ b/old-configure @@ -333,8 +333,11 @@ test -z "$_confdir" && _confdir="$_prefix/etc/mpv" mplayer_tmpdir=$(mktemp -d --tmpdir mpv-configure-XXXX) test -n "$mplayer_tmpdir" || die "Unable to create tmpdir." +trap 'rm -rf "$mplayer_tmpdir"' EXIT -TMPLOG="config.log" +mkdir old_build 2> /dev/null + +TMPLOG="old_build/config.log" rm -f "$TMPLOG" echo Parameters configure was run with: > "$TMPLOG" @@ -897,7 +900,6 @@ CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE if test ! -f Makefile ; then ln -s old-makefile Makefile fi -mkdir old_build 2> /dev/null cat > old_build/config.mak << EOF # -------- Generated by configure ----------- @@ -996,6 +998,3 @@ README for instructions on how to build mpv with the new build system. This will not work correctly on MinGW, Cygwin, OSX, and other systems. EOF - -# Last move: -rm -rf "$mplayer_tmpdir" -- cgit v1.2.3