From 69740bf6ee36466d0781a7a963ce685200032298 Mon Sep 17 00:00:00 2001 From: Martin Winkler Date: Wed, 9 Oct 2019 23:42:36 +0200 Subject: [PATCH] Fix using $1 to check if no step was given, although it was shifted Dry run no longer also assumes -q (quiet) option --- sequencer/sequencer.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sequencer/sequencer.sh b/sequencer/sequencer.sh index e540d90..fd77199 100755 --- a/sequencer/sequencer.sh +++ b/sequencer/sequencer.sh @@ -428,13 +428,13 @@ exep() { main() { local START=0 + local EMPTYCALL=1 # options check for arg in "$@" ; do case "$1" in --dry-run|-d) # shows what would be done DRY=1 - QUIET=1 shift ;; --help|-h) # show only help @@ -462,6 +462,7 @@ main() { # Assume starting at one for interactive mode START=1 else + EMPTYCALL=0 read -r -a START <<< "$1" shift STEP_ARGS="$@" @@ -484,7 +485,7 @@ main() { fi # check for starting step - if [ -z "$1" ] ; then + if [ $EMPTYCALL -ne 0 ] ; then # End here on quiet mode and no step was given if [ $QUIET -eq 1 ] ; then exit 1;