diff options
author | Jim Meyering <jim@meyering.net> | 2002-04-19 20:50:43 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2002-04-19 20:50:43 +0000 |
commit | dc3a2321e011bb615ca64b02a9aea5a1a853e9dd (patch) | |
tree | 222417f29ad5d03eb895fb580beb2e7515528ca4 /tests/rm | |
parent | 3f094fd26b326ee08dcb09990880a79c1ffa8d45 (diff) | |
download | coreutils-dc3a2321e011bb615ca64b02a9aea5a1a853e9dd.tar.xz |
Set $tmp the new way.
Diffstat (limited to 'tests/rm')
-rwxr-xr-x | tests/rm/deep-1 | 21 |
1 files changed, 8 insertions, 13 deletions
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. |