summaryrefslogtreecommitdiff
path: root/bin/byo
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2020-09-25 15:57:37 +0200
committerMarc Vertes <mvertes@free.fr>2020-09-25 15:57:37 +0200
commitaf308ee0510eb896f548ffb9f6a16d8794849fbf (patch)
treecbacd03e15625d4f4a706a9b60c60a4162ebd0f4 /bin/byo
parentfdca1b712c9d62213de1002a02b040fa66bfc0f1 (diff)
update
Diffstat (limited to 'bin/byo')
-rwxr-xr-xbin/byo7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/byo b/bin/byo
index ecaba23..389e112 100755
--- a/bin/byo
+++ b/bin/byo
@@ -11,9 +11,9 @@ Options:
-k do not umount and close yoda
'
-while getopts :cdk opt; do
+while getopts :Ccdk opt; do
case $opt in
- (c|d|k) eval "opt$opt=$opt" ;;
+ (C|c|d|k) eval "opt$opt=$opt" ;;
(*) printf %s "$usage"; exit 1 ;;
esac
done
@@ -25,9 +25,10 @@ dest=/mnt/backup/$(hostname)
[ -b /dev/mapper/yoda ] && noclose=1 || cryptsetup open "$(blkid --uuid "$yoda_uuid")" yoda
findmnt /dev/mapper/yoda /mnt >/dev/null && noumount=1 || mount /dev/mapper/yoda /mnt
time backup -v -d "$dest"
-backup -v -d "$dest" clean
+[ ! "$optC" ] || backup -v -d "$dest" clean
[ ! "$optd" ] || time duperemove -drh --hashfile="$dest/.hashfile" "$dest"
df -h / "$dest"
+ls -v "$dest"
[ ! "$optk" ] || noumount=1 noclose=1
[ ! "$optc" ] || noumount='' noclose=''
[ "$noumount" ] || umount /mnt