]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
use better trap
authorJim Meyering <jim@meyering.net>
Mon, 21 Aug 2000 09:39:59 +0000 (09:39 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 21 Aug 2000 09:39:59 +0000 (09:39 +0000)
tests/cp/same-file

index 908fe2e71cc40629b5f6524f92b10f3bdd729c71..09c535c374de7acc0c38c653402ecfb4c6568b17 100755 (executable)
@@ -15,7 +15,9 @@ VERSION_CONTROL=numbered; export VERSION_CONTROL
 pwd=`pwd`
 actual=actual-$$
 expected=expected-$$
-trap "cd $pwd; rm -rf $actual $expected dir" 0 1 2 3 15
+
+trap 'status=$?; cd $pwd; rm -rf $actual $expected && exit $status' 0
+trap 'exit $?' 1 2 13 15
 
 exec 1> $actual