Skip to content

Commit

Permalink
ttar: Remove existing directories
Browse files Browse the repository at this point in the history
Fixes ideaship#3.
  • Loading branch information
knweiss authored and Karsten Weiss committed Apr 10, 2018
1 parent 303593a commit 898bb7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ttar
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@ function extract {
fi
if [[ $line =~ ^Path:\ (.*)$ ]]; then
path=${BASH_REMATCH[1]}
if [ -e "$path" ] || [ -L "$path" ]; then
if [ -d "$path" ]; then
rm -r "$path"
elif [ -e "$path" ] || [ -L "$path" ]; then
rm "$path"
fi
elif [[ $line =~ ^Lines:\ (.*)$ ]]; then
Expand Down

0 comments on commit 898bb7c

Please sign in to comment.