From a2c711d034b23f712da8388eb131934002e52ba1 Mon Sep 17 00:00:00 2001 From: Pat Riehecky Date: Jun 17 2014 16:55:06 +0000 Subject: Minor logic error due to getopt restructure, $? != $# and not helpful anymore --- diff --git a/show_possible_srpms.sh b/show_possible_srpms.sh index f8c5eac..3092172 100755 --- a/show_possible_srpms.sh +++ b/show_possible_srpms.sh @@ -19,6 +19,7 @@ usage() { echo ' -b: specify a branch to examine' >&2 echo " defaults to repo's current branch" >&2 echo '' >&2 + echo " $0" >&2 echo " $0 -b c7" >&2 echo " $0 -r -b c7" >&2 echo " $0 -c -b remotes/origin/c7" >&2 @@ -43,14 +44,6 @@ filter () { } ##################################################################### -if [[ $? -ne 0 ]]; then - usage -fi - -if [[ ! -d .git ]] || [[ ! -d SPECS ]]; then - echo 'You need to run this from inside a sources git repo' - exit 1 -fi RHELTAG=0 QUIET=0 @@ -100,6 +93,11 @@ while [[ 0 -eq 0 ]]; do esac done +if [[ ! -d .git ]] || [[ ! -d SPECS ]]; then + echo 'You need to run this from inside a sources git repo' + exit 1 +fi + # commit message contains white space, set IFS to \n IFS=' '