New option to execute all steps regardless of continuity

This commit is contained in:
2021-04-21 23:00:36 +02:00
parent 2ddfefa646
commit f1385197d8

View File

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