Minor logic error due to getopt restructure, $? != $# and not helpful anymore

This commit is contained in:
Pat Riehecky 2014-06-17 11:49:43 -05:00 committed by Karanbir Singh
parent d02a8acabe
commit a2c711d034

View file

@ -19,6 +19,7 @@ usage() {
echo ' -b: specify a branch to examine' >&2 echo ' -b: specify a branch to examine' >&2
echo " defaults to repo's current branch" >&2 echo " defaults to repo's current branch" >&2
echo '' >&2 echo '' >&2
echo " $0" >&2
echo " $0 -b c7" >&2 echo " $0 -b c7" >&2
echo " $0 -r -b c7" >&2 echo " $0 -r -b c7" >&2
echo " $0 -c -b remotes/origin/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 RHELTAG=0
QUIET=0 QUIET=0
@ -100,6 +93,11 @@ while [[ 0 -eq 0 ]]; do
esac esac
done 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 # commit message contains white space, set IFS to \n
IFS=' IFS='
' '