From: Steven Baltakatei Sandoval Date: Mon, 6 Jul 2020 16:55:37 +0000 (+0000) Subject: fix(bkgpslog):Fix broken tempdir var name X-Git-Url: https://zdv2.bktei.com/gitweb/EVA-2020-02.git/commitdiff_plain/c9c573da200aef5273d6d55ef03bb6da7e0eb150?ds=sidebyside;hp=-c fix(bkgpslog):Fix broken tempdir var name --- c9c573da200aef5273d6d55ef03bb6da7e0eb150 diff --git a/exec/bkgpslog b/exec/bkgpslog index 55eba3c..3a7bae8 100755 --- a/exec/bkgpslog +++ b/exec/bkgpslog @@ -213,7 +213,7 @@ processArguments() { -r | --recipient) OPTION_RECIPIENTS="true"; argRecPubKeys+=("$2"); vbm "STATUS:pubkey added:""$2"; shift;; # Add recipients -c | --compress) OPTION_COMPRESS="true"; vbm "DEBUG:Compressed output mode enabled.";; # Enable compression -z | --time-zone) try setTimeZoneEV "$2"; shift;; # Set timestamp timezone - -t | --temp-dir) OPTION_TMPDIR="true" && argTmpDirPriority="$2"; shift;; # Set time zone + -t | --temp-dir) OPTION_TMPDIR="true" && argTempDirPriority="$2"; shift;; # Set time zone -R | --recipient-dir) OPTION_RECIPIENTS="true"; OPTION_RECDIR="true" && argRecDir="$2"; shift;; # Add recipient watch dir *) echoerr "ERROR: Unrecognized argument: $1"; echoerr "STATUS:All arguments:$*"; exit 1;; # Handle unrecognized options. esac @@ -1064,7 +1064,8 @@ magicParseCompressionArg() { } # Form compression cmd string and filename suffix magicInitWorkingDir() { # Desc: Determine temporary working directory from defaults or user input - # Input: vars: OPTION_TEMPDIR, argTmpDirPriority, DIR_TMP_DEFAULT + # Usage: magicInitWorkignDir + # Input: vars: OPTION_TEMPDIR, argTempDirPriority, DIR_TMP_DEFAULT # Input: vars: SCRIPT_TIME_START # Output: vars: DIR_TMP # Depends: processArguments(), vbm(), yell() @@ -1076,7 +1077,7 @@ magicInitWorkingDir() { if [[ -d "$argTempDirPriority" ]]; then DIR_TMP_PARENT="$argTempDirPriority"; else - yell "WARNING:Specified temporary working directory not valid:$OPTION_TMPDIR"; + yell "WARNING:Specified temporary working directory not valid:$argTempDirPriority"; exit 1; # Exit since user requires a specific temp dir and it is not available. fi; else @@ -1100,7 +1101,7 @@ main() { processArguments "$@"; ## Act upon arguments ### Determine working directory - magicInitWorkingDir; # Sets DIR_TMP + magicInitWorkingDir; # Sets DIR_TMP from argTempDirPriority ### Set output encryption and compression option strings #### React to "-r" ("encryption recipients") option magicParseRecipientArgs; # Updates recPubKeysValid, CMD_ENCRYPT[_SUFFIX]