diff options
author | Jim Meyering <jim@meyering.net> | 2002-04-19 19:55:21 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2002-04-19 19:55:21 +0000 |
commit | 3f094fd26b326ee08dcb09990880a79c1ffa8d45 (patch) | |
tree | 1f3fffe1126fae4e7ecd303470dd9fcb8c59c9f7 /tests/rm | |
parent | e86cf7f5e6ca2ebdec14a7ef5f7c7f1ad680096f (diff) | |
download | coreutils-3f094fd26b326ee08dcb09990880a79c1ffa8d45.tar.xz |
Use `rm', not $RM. Use better trap.
Diffstat (limited to 'tests/rm')
-rwxr-xr-x | tests/rm/f-1 | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/rm/f-1 b/tests/rm/f-1 index 495bca88e..da79b7229 100755 --- a/tests/rm/f-1 +++ b/tests/rm/f-1 @@ -1,15 +1,16 @@ #!/bin/sh -: ${RM=rm} test=f-1 if test "$VERBOSE" = yes; then set -x - $RM --version + rm --version fi -: ${RM_TMPDIR=.} -tmp=$RM_TMPDIR/t-rm.$$ +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 test_failure=0 mkdir $tmp || test_failure=1 @@ -20,7 +21,6 @@ if test $test_failure = 1; then fi fail=0 -$RM -f $tmp/no-such-file || fail=1 -rm -rf $tmp +rm -f $tmp/no-such-file || fail=1 exit $fail |