Return 0 only if no --help, --verion, or opt errors.

This commit is contained in:
Daniel Nichter
2011-12-15 12:12:18 -07:00
parent f3ac1b20c2
commit a172a3f2a7

View File

@@ -59,12 +59,12 @@ usage_or_errors() {
if [ "$OPT_VERSION" = "yes" ]; then
local version=$(grep '^pt-[^ ]\+ [0-9]' $file)
echo "$version"
return 0
return 1
fi
if [ "$OPT_HELP" = "yes" ]; then
usage "$file"
return 0
return 1
fi
local n_errs=${#OPT_ERRS[*]}