summaryrefslogtreecommitdiff
path: root/tests/mkdir/p-2
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mkdir/p-2')
-rwxr-xr-xtests/mkdir/p-213
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/mkdir/p-2 b/tests/mkdir/p-2
index 5eaf70c95..7e65697cb 100755
--- a/tests/mkdir/p-2
+++ b/tests/mkdir/p-2
@@ -1,21 +1,18 @@
#!/bin/sh
-# Just like p-1, but with TMPDIR=.
-
-TMPDIR=.
+# Just like p-1, but with an absolute path.
if test "$VERBOSE" = yes; then
set -x
mkdir --version
fi
-tmp=$TMPDIR/t-mkdir.$$
-temp_files=$tmp
-rm -rf $temp_files
+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
mkdir --parents $tmp || fail=1
test -d $tmp || fail=1
-rm -rf $temp_files
-
exit $fail