Sequencer returns returnvalue of last executed step

This commit is contained in:
2020-09-30 21:46:50 +02:00
parent 84a798dea5
commit 5aba72ee49

View File

@@ -9,7 +9,7 @@
VERSION_REV=11
VERSION_MAJOR=0
VERSION_MINOR=0
VERSION_MINOR=1
## Start of generic script part
@@ -19,6 +19,7 @@ VERBOSE=0
SINGLE=0
ERNO=0
STEP_ARGS=
STEP_RETURN=255
MAX_STEP=512
ALIAS=
SEQ_CONFIG_NAME=".seqs"
@@ -519,6 +520,7 @@ execute() {
case $answer in
[yY])
step_$1 $1 "${STEP_ARGS[@]}"
STEP_RETURN=$?
;;
[sS]) # skip step
return 0
@@ -537,6 +539,7 @@ execute() {
esac
else
step_$1 $1 "${STEP_ARGS[@]}"
STEP_RETURN=$?
fi
}
@@ -611,6 +614,7 @@ continous() {
break
fi
done
return $STEP_RETURN
}
# selection <STEP ARRAY>
@@ -629,13 +633,13 @@ selection() {
for i in ${array[@]} ; do
checkStep "$i"
step=$?
# stop on step 0
if [ $step -eq 0 ] ; then
return 1
else
execute $step
fi
done
return $STEP_RETURN
}
# Creating a minimal seq (step definition) template