]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
don't bother with TMPDIR
authorJim Meyering <jim@meyering.net>
Fri, 19 Apr 2002 19:47:16 +0000 (19:47 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 19 Apr 2002 19:47:16 +0000 (19:47 +0000)
tests/rm/r-3

index bbea37001eab8d7ffe94d272edae0f99b49ddb3a..96cb8844a3e12c97d54f09aa62b7f5757d156b3b 100755 (executable)
@@ -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