Cannot error on unset variables and at the same time process maybe-empty commandline args

This commit is contained in:
Hamish Coleman 2017-06-30 11:04:48 +08:00
parent 46cb7c09a8
commit 390f5bb659

View File

@ -6,7 +6,7 @@
# FIXME
# - the description file is expected to be in the current dir
set -o nounset -o pipefail -o errexit
set -o pipefail -o errexit
DESCRIPTIONS='Descriptions.txt'
@ -21,6 +21,8 @@ if [ -z "$1" ]; then
exit 1
fi
set -o nounset
LINE=$(egrep "^$FILE " "$DESCRIPTIONS")
if [ $? -ne 0 ]; then