summaryrefslogtreecommitdiff
path: root/tests/rm
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-04-19 19:47:16 +0000
committerJim Meyering <jim@meyering.net>2002-04-19 19:47:16 +0000
commit9f79f8d7e0a3bf95b677e42f69393d7608803db2 (patch)
treee3a24d1f71f0ce4fe0c124908a6990c25e5f2693 /tests/rm
parent56931437e3976faa6675712f89d5e79262407ca3 (diff)
downloadcoreutils-9f79f8d7e0a3bf95b677e42f69393d7608803db2.tar.xz
don't bother with TMPDIR
Diffstat (limited to 'tests/rm')
-rwxr-xr-xtests/rm/r-37
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/rm/r-3 b/tests/rm/r-3
index bbea37001..96cb8844a 100755
--- a/tests/rm/r-3
+++ b/tests/rm/r-3
@@ -3,14 +3,15 @@
# An early version of my rewritten rm failed to remove all of
# the files on SunOS4 when there were 254 or more in a directory.
-: ${TMPDIR=.}
-
if test "$VERBOSE" = yes; then
rm --version
set -x
fi
-tmp=$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
framework_fail=0
mkdir $tmp || framework_fail=1