chiark
/
gitweb
/
~ian
/
chiark-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
* chiark-backup: remove snap-mount properly whether it's a dir or a leaf
[chiark-utils.git]
/
backup
/
nosnap
diff --git
a/backup/nosnap
b/backup/nosnap
index c1f16dd59bc8fec36d92f3ceb795fa302b864411..b9d57ab21edf166d342c6c83c5e90ed97d061f97 100755
(executable)
--- a/
backup/nosnap
+++ b/
backup/nosnap
@@
-3,7
+3,12
@@
set -e
removes () {
- rm -f -- "$vardir/snap-mount" "$vardir/snap-device"
+ if test -d "$vardir/snap-mount"; then
+ rmdir -- "$vardir/snap-mount"
+ else
+ rm -f -- "$vardir/snap-mount"
+ fi
+ rm -f -- "$vardir/snap-device"
}
vardir="$2"