chiark / gitweb /
chiark-backup: really cope properly with nosnap removal
[chiark-utils.git] / backup / nosnap
index b9d57ab..6b8db64 100755 (executable)
@@ -3,11 +3,7 @@
 set -e
 
 removes () {
-       if test -d "$vardir/snap-mount"; then
-               rmdir -- "$vardir/snap-mount"
-       else
-               rm -f -- "$vardir/snap-mount"
-       fi
+       rmdir -- "$vardir/snap-mount" || rm -f -- "$vardir/snap-mount"
        rm -f -- "$vardir/snap-device"
 }