Small output update

This commit is contained in:
2019-12-13 12:18:51 +01:00
parent 358cff38b1
commit d182f5e0c6

View File

@@ -421,7 +421,13 @@ checkStep() {
if (( $ref < 1 || $ref > $MAX_STEP )) ; then
return 0
else
return $ref
existsFunction step_$ref
if [ $? -eq 0 ] ; then
return $ref
else
# step doesn't exist
return 0
fi
fi
}
@@ -435,13 +441,7 @@ step() {
if [ "$stepNo" == "0" ] ; then
return 1
else
existsFunction step_${stepNo}
if [ $? -eq 0 ] ; then
eval 'step_'"$stepNo"
else
echoerr " [E] Invalid step: $stepNo"
return 2
fi
step_$stepNo
fi
}
@@ -456,6 +456,8 @@ continous() {
if [[ $step == 0 ]] ; then
return 1
fi
echo " [I] Staring sequence $(realpath $0) ..."
for ((i=$step; i<=${MAX_STEP}; i++)); do
execute -q $i
@@ -472,6 +474,13 @@ continous() {
selection() {
local step=0
local array=("$@")
if [ ${#array[@]} -eq 0 ] ; then
return 1
fi
echo " [I] Staring sequence $(realpath $0) ..."
for i in ${array[@]} ; do
checkStep "$i"
step=$?
@@ -724,13 +733,13 @@ main() {
parseAlias
echo " [I] Staring sequence $(realpath $0) ..."
# run configuration for seq if available
existsFunction step_config
if [ $? -eq 0 ] ; then
echo " [I] Running...step_config"
echo " [I] Configuring sequence (step_config) ..."
step_config
fi
# check if more than one step is given and select execution mode
if [ "${#START[@]}" -gt "1" ]; then
selection "${START[@]}"