diff options
author | Jim Meyering <jim@meyering.net> | 2002-04-19 21:17:45 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2002-04-19 21:17:45 +0000 |
commit | d0ae660607f2d438654a2adf13231e586c62fc3f (patch) | |
tree | 11f8d5d1802ac28c86b5a96ab301fba06019e7ef /tests/mkdir/concurrent-1 | |
parent | 5aaccdf6a7b9a56aff56d6e5be211151df2acf71 (diff) | |
download | coreutils-d0ae660607f2d438654a2adf13231e586c62fc3f.tar.xz |
Use better trap.
Diffstat (limited to 'tests/mkdir/concurrent-1')
-rwxr-xr-x | tests/mkdir/concurrent-1 | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/mkdir/concurrent-1 b/tests/mkdir/concurrent-1 index 738ac146c..0b1a9ae89 100755 --- a/tests/mkdir/concurrent-1 +++ b/tests/mkdir/concurrent-1 @@ -9,14 +9,13 @@ if test "$VERBOSE" = yes; then mkdir --version fi -temp_dir=$TMPDIR/t-mkdir.$$ -tmp=$temp_dir/a/b/c -rm -rf $temp_dir +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 +mkdir --parents $pwd/$tmp/a/b/c || fail=1 test -d $tmp || fail=1 -rm -rf $temp_dir - exit $fail |