Skip to content

Commit

Permalink
Fixed issue: left behind auto-dest folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
journeyman88 committed Nov 14, 2018
1 parent 64217ac commit 41c34a2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mkwebfont
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#

failsafe=1
autoDest=0
while getopts d:f: opt
do
{
Expand Down Expand Up @@ -50,7 +51,8 @@ shift 2
if [ -z "$destdir" ]; then
{
mkdir "./${family}"
destdir="./${family}"
destdir=`realpath "./${family}"`
autoDest=1
}
else
{
Expand All @@ -71,6 +73,11 @@ fi
if [ $# -eq 0 ]; then
{
printf >&2 "No file in input. Operation aborted.\n"
if [ $autoDest -eq 1 ]; then
{
rm -rf "${destdir}"
}
fi
exit 1
}
fi
Expand Down

0 comments on commit 41c34a2

Please sign in to comment.