]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
use trap stuff from sample-test
authorJim Meyering <jim@meyering.net>
Sat, 15 Jun 2002 09:58:37 +0000 (09:58 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 15 Jun 2002 09:58:37 +0000 (09:58 +0000)
tests/mkdir/perm

index 4b8cda5b671bd1544ed59a9fe37bc77ce9ad0696..cc5d15b2773ddef4861b34865fb3af80cb7219ee 100755 (executable)
@@ -8,8 +8,8 @@ if test "$VERBOSE" = yes; then
 fi
 
 pwd=`pwd`
-tmp=perm.$$
-trap 'status=$?; cd $pwd; chmod -R u+rwx $tmp; rm -rf $tmp && exit $status' 0
+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
 
 framework_failure=0