You can only have one trap handler per signal
authorQuentin Smith <quentin@mit.edu>
Fri, 5 Mar 2010 20:45:19 +0000 (15:45 -0500)
committerQuentin Smith <quentin@mit.edu>
Fri, 5 Mar 2010 20:45:19 +0000 (15:45 -0500)
generate-preview.sh

index 690efb2c33059fd3ab17740f335be9db62fd26a0..a50be6767827ee3fb8446a5ea050ac1c066ab7ee 100644 (file)
@@ -17,8 +17,7 @@ else
     tmpoutdir=`mktemp -d`
     echo "Building ikiwiki source in $tmpdir"
     echo "Building ikiwiki into $tmpoutdir"
-    trap 'rm -rf "$tmpdir"' 0
-    trap 'rm -rf "$tmpoutdir"' 0
+    trap 'rm -rf "$tmpdir"; rm -rf "$tmpoutdir"' 0
     cd "$tmpdir"
     (cd "$srcdir/ikiwiki" && tar c .) | (cd "$tmpdir" && tar x)
     ./Makefile.PL INSTALL_BASE="$tmpoutdir" PREFIX=