From dc3a2321e011bb615ca64b02a9aea5a1a853e9dd Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 19 Apr 2002 20:50:43 +0000 Subject: Set $tmp the new way. --- tests/rm/deep-1 | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'tests/rm') diff --git a/tests/rm/deep-1 b/tests/rm/deep-1 index 1fc4d1922..44d7c9407 100755 --- a/tests/rm/deep-1 +++ b/tests/rm/deep-1 @@ -7,25 +7,20 @@ # If this test takes too long on your system, blame the OS. -: ${RM=rm} -: ${MKDIR=mkdir} - -test=deep-1 - -# Don't require use of TMPDIR. -: ${RM_TMPDIR=.} - if test "$VERBOSE" = yes; then set -x - $RM --version + rm --version fi +pwd=`pwd` +tmp=`echo "$0"|sed 's,.*/,,'`.tmp +trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap '(exit $?); exit' 1 2 13 15 + umask 022 fail=0 -tmp=$RM_TMPDIR/t-rm.$$ - k20=/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k k200=$k20$k20$k20$k20$k20$k20$k20$k20$k20$k20 @@ -37,14 +32,14 @@ k_deep=$k200$k200 # Create a directory in $tmp with lots of `k' components. deep=$tmp$k_deep echo "creating a hierarchy 400 deep in $tmp..." |tr -d '\012' -$MKDIR -p $deep || fail=1 +mkdir -p $deep || fail=1 echo done # Make sure the deep dir was created. test -d $deep || fail=1 echo "deleting $tmp..." |tr -d '\012' -$RM -r $tmp || fail=1 +rm -r $tmp || fail=1 echo done # Make sure all of $tmp was deleted. -- cgit v1.2.3-70-g09d2