-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
} # 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()
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
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]