diff --git a/scripts/backup-zfs-dataset.sh b/scripts/backup-zfs-dataset.sh index 54d1bdd..6064dc6 100755 --- a/scripts/backup-zfs-dataset.sh +++ b/scripts/backup-zfs-dataset.sh @@ -34,20 +34,20 @@ while [[ $# -gt 0 ]]; do destination="${2}" shift 2 ;; - -b | --base) - if [ "${create_base:=1}" -ne 1 ]; then - >&2 printf "Error: Cannot create base backup when specifying differently.\n" - usage - fi - shift 1 - ;; - -i | --incremental) - if [ "${create_base:=0}" -ne 0 ]; then - >&2 printf "Error: Cannot create incremental backup when specifying differently.\n" - usage + -b | --base) + if [ "${create_base:=1}" -ne 1 ]; then + >&2 printf "Error: Cannot create base backup when specifying differently.\n" + usage fi - shift 1 - ;; + shift 1 + ;; + -i | --incremental) + if [ "${create_base:=0}" -ne 0 ]; then + >&2 printf "Error: Cannot create incremental backup when specifying differently.\n" + usage + fi + shift 1 + ;; -c | --compression_level) if ! [[ "${2}" =~ [[:digit:]] ]]; then >&2 printf "Error: Invalid compression level: '%s'\n" "${2}" @@ -64,10 +64,10 @@ while [[ $# -gt 0 ]]; do max_size="${2}" shift 2 ;; - -t | --tag) - tag="${2}-" - shift 2 - ;; + -t | --tag) + tag="${2}-" + shift 2 + ;; *) >&2 printf "Error: Invalid option: '%s'\n" "${1}" usage