diff --git a/sequencer/sequencer.sh b/sequencer/sequencer.sh index 03a0f82..b5c064b 100755 --- a/sequencer/sequencer.sh +++ b/sequencer/sequencer.sh @@ -485,7 +485,7 @@ execute() { fi # don't execute step functions which are not available - if [ $NOTFOUND -eq 1 ] ; then + if [ $NOTFOUND -ne 0 ] ; then return $NOTFOUND fi @@ -540,7 +540,6 @@ checkStep() { eval 'ref=$alias_'"$1" # Catch special character after eval if ! [[ "$ref" =~ $rex ]] ; then - echoerr " [E] Invalid step: $1" ref=0 fi else @@ -548,6 +547,7 @@ checkStep() { fi if (( $ref < 1 || $ref > $MAX_STEP )) ; then + echoerr " [E] Invalid step: $ref" return 0 else existsFunction step_$ref @@ -555,6 +555,7 @@ checkStep() { return $ref else # step doesn't exist + echoerr " [E] Invalid step: $ref" return 0 fi fi @@ -593,7 +594,7 @@ continous() { execute -q $i local res=$? if [ $res -ne 0 ] ; then - break; + break fi done } @@ -616,7 +617,7 @@ selection() { step=$? # stop on step 0 if [ $step -eq 0 ] ; then - break + return 1 else execute $step fi