diff options
author | wm4 <wm4@nowhere> | 2014-09-26 13:53:20 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-09-26 13:53:20 +0200 |
commit | 17d031f88c1191e060d8cf23877eefdd47e4bbf3 (patch) | |
tree | 1a47202858199dc591bb651c5d849d6a94058a3f /old-configure | |
parent | 8fd954ac8e7fe5d2770d74c3780bdd5f44aa0906 (diff) | |
download | mpv-17d031f88c1191e060d8cf23877eefdd47e4bbf3.tar.bz2 mpv-17d031f88c1191e060d8cf23877eefdd47e4bbf3.tar.xz |
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.
Diffstat (limited to 'old-configure')
-rwxr-xr-x | old-configure | 9 |
1 files changed, 4 insertions, 5 deletions
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" |