diff options
Diffstat (limited to 'bin/byo')
| -rwxr-xr-x | bin/byo | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -2,23 +2,26 @@ # Backup to yoda [ "$USER" = root ] || exec sudo "$0" "$@" -usage='Usage: byo [-cdk] [/dev/sda2] +usage='Usage: byo [-cdkx] [/dev/sda2] Backup local disk to yoda external disk. Options: -c close and umount yoda -d dedupe yoda -k do not umount and close yoda + -x enable debug traces ' -while getopts :Ccdk opt; do +while getopts :Ccdkx opt; do case $opt in - (C|c|d|k) eval "opt$opt=$opt" ;; + (C|c|d|k|x) eval "opt$opt=$opt" ;; (*) printf %s "$usage"; exit 1 ;; esac done shift $((OPTIND - 1)) +[ "$optx" ] && set -x + dev=$1 yoda_uuid='8c463221-6bb7-414e-9060-c9570bb3a6bb' [ "$dev" ] || dev=$(blkid --uuid "$yoda_uuid") |
