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