From 306c8e8b4fec79a581f2cad7b160ba6f61f600ac Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 19 Apr 2002 21:55:30 +0000 Subject: Lots of clean-up: E.g., (exit $fail); exit t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0 --- tests/cp/symlink-slash | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/cp/symlink-slash') diff --git a/tests/cp/symlink-slash b/tests/cp/symlink-slash index 7fb0c0717..827888c68 100755 --- a/tests/cp/symlink-slash +++ b/tests/cp/symlink-slash @@ -9,10 +9,13 @@ fi . $srcdir/../lang-default -tmp=t-cpsymsl.$$ +pwd=`pwd` +t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ +trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0 +trap '(exit $?); exit' 1 2 13 15 framework_failure=0 -mkdir $tmp || framework_failure=1 +mkdir -p $tmp || framework_failure=1 cd $tmp || framework_failure=1 mkdir dir || framework_failure=1 @@ -34,7 +37,4 @@ set `ls -l s` # call and so cp ends up dereferencing the symlink and copying the directory. test "$*" = 'total 0' && : || fail=1 -cd .. -rm -rf $tmp - -exit $fail +(exit $fail); exit -- cgit v1.2.3-54-g00ecf