New option to execute all steps regardless of continuity
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
## Version information
|
## Version information
|
||||||
|
|
||||||
VERSION_REV=13
|
VERSION_REV=13
|
||||||
VERSION_MAJOR=2
|
VERSION_MAJOR=3
|
||||||
VERSION_MINOR=0
|
VERSION_MINOR=0
|
||||||
|
|
||||||
## Start of generic script part
|
## Start of generic script part
|
||||||
@@ -59,6 +59,7 @@ helpSequencer() {
|
|||||||
Usage: ${0##*/} [OPTIONS] [STEP NUMBER(s) or ALIAS] [STEP ARGUMENTS]
|
Usage: ${0##*/} [OPTIONS] [STEP NUMBER(s) or ALIAS] [STEP ARGUMENTS]
|
||||||
|
|
||||||
[OPTIONS]
|
[OPTIONS]
|
||||||
|
--all, -a : Run all steps regardless of continuity
|
||||||
--config, -c : Open sequence configuration file (also sets -qq)
|
--config, -c : Open sequence configuration file (also sets -qq)
|
||||||
--dry-run, -d : Only print to console what would be done
|
--dry-run, -d : Only print to console what would be done
|
||||||
! Attention - Sequence must support this
|
! Attention - Sequence must support this
|
||||||
@@ -530,7 +531,7 @@ initSeqConfig() {
|
|||||||
echo " [W] Using seq configuration from template $configTemplate"
|
echo " [W] Using seq configuration from template $configTemplate"
|
||||||
echo " (Copied to $configDir)"
|
echo " (Copied to $configDir)"
|
||||||
SEQ_CONFIG_FILE="$configLoc"
|
SEQ_CONFIG_FILE="$configLoc"
|
||||||
. "$configLoc"
|
. "$configTemplate"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -780,9 +781,15 @@ step() {
|
|||||||
# (max $MAX_STEP)
|
# (max $MAX_STEP)
|
||||||
# execute sequence continously from given starting step
|
# execute sequence continously from given starting step
|
||||||
continous() {
|
continous() {
|
||||||
|
local continous_all=0
|
||||||
local continous_i
|
local continous_i
|
||||||
local continous_step=0
|
local continous_step=0
|
||||||
|
|
||||||
|
if [ "$1" == "-a" ]; then
|
||||||
|
continous_all=1
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
checkStep "$1"
|
checkStep "$1"
|
||||||
continous_step=$?
|
continous_step=$?
|
||||||
[[ $continous_step == 0 ]] && return 1
|
[[ $continous_step == 0 ]] && return 1
|
||||||
@@ -791,7 +798,7 @@ continous() {
|
|||||||
|
|
||||||
for ((continous_i=$continous_step; continous_i<=${MAX_STEP}; continous_i++)); do
|
for ((continous_i=$continous_step; continous_i<=${MAX_STEP}; continous_i++)); do
|
||||||
execute -q $continous_i
|
execute -q $continous_i
|
||||||
[ $? -ne 0 ] && break
|
[ $? -ne 0 ] && [ $continous_all -eq 0 ] && break
|
||||||
[ $STEP_RETURN -ne 0 ] && break
|
[ $STEP_RETURN -ne 0 ] && break
|
||||||
done
|
done
|
||||||
return $STEP_RETURN
|
return $STEP_RETURN
|
||||||
@@ -1070,11 +1077,15 @@ exep() {
|
|||||||
main() {
|
main() {
|
||||||
local arg
|
local arg
|
||||||
local START=0
|
local START=0
|
||||||
|
local STARTALL
|
||||||
local EMPTYCALL=1
|
local EMPTYCALL=1
|
||||||
|
|
||||||
# options check
|
# options check
|
||||||
for arg in "$@" ; do
|
for arg in "$@" ; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
--all|-a) # execute all steps; regardless continouity
|
||||||
|
STARTALL="-a"
|
||||||
|
shift;;
|
||||||
--config|-c) # open sequence configuration file
|
--config|-c) # open sequence configuration file
|
||||||
QUIET=2
|
QUIET=2
|
||||||
SEQ_CONFIG_EDIT=1
|
SEQ_CONFIG_EDIT=1
|
||||||
@@ -1203,7 +1214,7 @@ main() {
|
|||||||
elif [ "${#START[@]}" -gt "1" ]; then
|
elif [ "${#START[@]}" -gt "1" ]; then
|
||||||
selection "${START[@]}"
|
selection "${START[@]}"
|
||||||
else
|
else
|
||||||
continous $START
|
continous $STARTALL $START
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user