]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Let traps handle removing temporary directories.
authorJim Meyering <jim@meyering.net>
Thu, 17 Nov 2005 19:52:08 +0000 (19:52 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 17 Nov 2005 19:52:08 +0000 (19:52 +0000)
tests/mv/acl

index 716d19589818b460ea480eeac524e210a296da79..9ffb86a6e56e6a0dff729118cea0841e18f087a3 100755 (executable)
@@ -4,9 +4,6 @@
 
 . $srcdir/../acl
 . $srcdir/setup
-if test -z "$other_partition_tmpdir"; then
-  exit 77
-fi
 # Make sure we get English translations.
 . $srcdir/../lang-default
 
@@ -22,6 +19,11 @@ t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
 trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
 trap '(exit $?); exit $?' 1 2 13 15
 
+if test -z "$other_partition_tmpdir"; then
+  (exit 77); exit 77
+fi
+t0="$t0 $other_partition_tmpdir"
+
 framework_failure=0
 mkdir -p $tmp || framework_failure=1
 cd $tmp || framework_failure=1
@@ -60,6 +62,4 @@ if test $framework_failure = 1; then
   (exit 1); exit 1
 fi
 
-cd $pwd
-rm -fr $tmp $other_partition_tmpdir
 exit $fail