From ee689da7f36179abf6a13e470dd7ed556061d227 Mon Sep 17 00:00:00 2001 From: deajan Date: Tue, 20 Jun 2017 14:50:50 +0200 Subject: [PATCH] Allow --partial, --delete and --dontgetsize to override config files --- dev/n_obackup.sh | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/dev/n_obackup.sh b/dev/n_obackup.sh index fe46da3..262a5ab 100755 --- a/dev/n_obackup.sh +++ b/dev/n_obackup.sh @@ -7,7 +7,7 @@ PROGRAM="obackup" AUTHOR="(C) 2013-2017 by Orsiris de Jong" CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr" PROGRAM_VERSION=2.1-beta2 -PROGRAM_BUILD=2017021001 +PROGRAM_BUILD=2017062001 IS_STABLE=no #### Execution order #__WITH_PARANOIA_DEBUG @@ -1889,7 +1889,9 @@ function Usage { _DRYRUN=false no_maxtime=false stats=false -PARTIAL=no +partial_transfers=false +delete_vanished=false +dont_get_backup_size=false _DECRYPT_MODE=false DECRYPT_PATH="" _ENCRYPT_MODE=false @@ -1914,16 +1916,16 @@ function GetCommandlineArguments { stats=false ;; --partial) - PARTIAL="yes" + partial_transfers=true ;; --no-maxtime) no_maxtime=true ;; --delete) - DELETE_VANISHED_FILES="yes" + delete_vanished=true ;; --dontgetsize) - GET_BACKUP_SIZE="no" + dont_get_backup_size=true ;; --help|-h|--version|-v) Usage @@ -2029,5 +2031,16 @@ if [ $no_maxtime == true ]; then HARD_MAX_EXEC_TIME_FILE_TASK=0 HARD_MAX_EXEC_TIME_TOTAL=0 fi + +if [ $partial_transfers == true ]; then + PARTIAL="yes" +fi + +if [ $delete_vanished == true ]; then + DELETE_VANISHED_FILES="yes" +fi + +if [ $dont_get_backup_size == true ]; then + GET_BACKUP_SIZE="no" RunBeforeHook Main