If the directory already exists, the failing script cleans it up.
Oops. Create it before setting the cleanup trap.
This commit is contained in:
parent
535c8a06a7
commit
a877480082
1 changed files with 2 additions and 2 deletions
|
@ -7,11 +7,11 @@ fi
|
|||
|
||||
name=$1; shift
|
||||
|
||||
mkdir $name
|
||||
|
||||
# arrange cleanup
|
||||
trap 'rm -rf "$name"' 0
|
||||
|
||||
mkdir -p $name
|
||||
|
||||
dir=.
|
||||
until [ $# = 0 ]; do
|
||||
if [ "$1" = -C ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue