Add backup commands

This commit is contained in:
Andrew Miner
2017-07-10 20:10:33 -07:00
parent 518f1067c3
commit dc81e990f1
6 changed files with 122 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
function die {
echo $*; exit 1
}
LOCAL_MOUNT="$HOME/.backup-drive"
if mount | grep -q "$LOCAL_MOUNT"; then
umount "$LOCAL_MOUNT" || die "Could not unmount $LOCAL_MOUNT"
fi
[[ -e "$LOCAL_MOUNT" ]] && rm -r "$LOCAL_MOUNT"