projects
/
grml-debootstrap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix `cleanup` function
[grml-debootstrap.git]
/
grml-debootstrap
diff --git
a/grml-debootstrap
b/grml-debootstrap
index
2124614
..
08e6fe2
100755
(executable)
--- a/
grml-debootstrap
+++ b/
grml-debootstrap
@@
-299,8
+299,10
@@
cleanup() {
# remove directory only if we used the default with process id inside the name
if echo "$MNTPOINT" | grep -q '/mnt/debootstrap\.' ; then
# remove directory only if we used the default with process id inside the name
if echo "$MNTPOINT" | grep -q '/mnt/debootstrap\.' ; then
- einfo "Removing directory ${MNTPOINT}"
- rmdir "$MNTPOINT" || eend $?
+ if test -d "$MNTPOINT" ; then
+ einfo "Removing directory ${MNTPOINT}"
+ rmdir "$MNTPOINT" || eend $?
+ fi
fi
fi
fi
fi
fi
fi