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