Exit cleanly after finding an error in the args.
This commit is contained in:
parent
d2c81e7747
commit
0d6e3e73cc
@ -9,6 +9,8 @@ SPACE=0 # default to no spaces between words
|
|||||||
COUNT=1 # default to one group of passphrases
|
COUNT=1 # default to one group of passphrases
|
||||||
WORDS=3 # default to three-word phrases
|
WORDS=3 # default to three-word phrases
|
||||||
|
|
||||||
|
DICT='/usr/share/dict/words' # standard location of the words file
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
while [[ $# > 0 ]]; do # iterate through arguments, one or two steps at a time
|
while [[ $# > 0 ]]; do # iterate through arguments, one or two steps at a time
|
||||||
@ -48,6 +50,7 @@ done
|
|||||||
if [ "$COUNT" -lt 1 ] || [ "$WORDS" -lt 1 ]; then
|
if [ "$COUNT" -lt 1 ] || [ "$WORDS" -lt 1 ]; then
|
||||||
|
|
||||||
echo -e "Don't be cheeky.\n"
|
echo -e "Don't be cheeky.\n"
|
||||||
|
exit 1
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user