From e0daa360e99304bb4e4854a5f0b091c8c794a78c Mon Sep 17 00:00:00 2001 From: Martin Winkler Date: Mon, 1 Feb 2021 22:22:15 +0100 Subject: [PATCH] New global variable SEQUENCER_ARGS containing sequencer options to pass down to other seqs eventually --- sequencer/sequencer.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sequencer/sequencer.sh b/sequencer/sequencer.sh index e4edda6..8c47936 100755 --- a/sequencer/sequencer.sh +++ b/sequencer/sequencer.sh @@ -18,6 +18,7 @@ DRY=0 VERBOSE=0 SINGLE=0 ERNO=0 +SEQUENCER_ARGS= STEP_ARGS= STEP_RETURN=255 MAX_STEP=512 @@ -91,6 +92,8 @@ sequencer.sh global variables: \$CONTEXT_HELP 0 : normal sequence execution 1 : current run only displays help (-h|-ha) + \$SEQUENCER_ARGS + String of all given options \$SEQ_CONFIG_HOME Path to user specific seq configuration directory \$SEQ_CONFIG_FILE @@ -347,6 +350,8 @@ initSeqConfig() { echo -n " [I] Creating $(realpath $configDir)..." exe mkdir -p "$configDir" && echo "Ok" || echo "Nok" exe chmod 700 "$configDir" + else + SEQ_CONFIG_HOME="$configDir" fi if [ -s "$configLoc" ] ; then @@ -891,6 +896,7 @@ main() { case "$1" in --dry-run|-d) # shows what would be done DRY=1 + SEQUENCER_ARGS+=" $1" shift ;; --help|-h) # show only help @@ -902,11 +908,13 @@ main() { exit 0; ;; --profile|-p) # seq profile name + SEQUENCER_ARGS+=" $1 $2" shift SEQ_PROFILE_NAME="$1" shift ;; --quiet|-q|-qq) # detect if option quiet is available + SEQUENCER_ARGS+=" $1" if [ "$1" == "-qq" ] ; then QUIET=2 else @@ -915,10 +923,12 @@ main() { shift ;; --single|-s) # execute only one step and stop + SEQUENCER_ARGS+=" $1" SINGLE=1 shift ;; --verbose|-v) # set verbose flag + SEQUENCER_ARGS+=" $1" VERBOSE=1 shift ;;