scripts: avoid dumping usage on parser fail

Avoid letting the error message from parseopts get lost in the usage
output from pacman-key and makepkg (which is already verbose).
This commit is contained in:
Dave Reisner 2012-04-17 00:27:37 -04:00 committed by Dan McGee
parent f61f075b1c
commit 62dbf7ec43
2 changed files with 2 additions and 2 deletions

View File

@ -1964,7 +1964,7 @@ OPT_LONG=('allsource' 'asroot' 'ignorearch' 'check' 'clean' 'nodeps'
OPT_LONG+=('noconfirm' 'noprogressbar')
if ! parseopts "$OPT_SHORT" "${OPT_LONG[@]}" -- "$@"; then
echo; usage; exit 1 # E_INVALID_OPTION;
exit 1 # E_INVALID_OPTION;
fi
set -- "${OPTRET[@]}"
unset OPT_SHORT OPT_LONG OPTRET

View File

@ -466,7 +466,7 @@ OPT_LONG=('add' 'config:' 'delete' 'edit-key' 'export' 'finger' 'gpgdir:'
'lsign-key' 'populate' 'recv-keys' 'refresh-keys' 'updatedb'
'verify' 'version')
if ! parseopts "$OPT_SHORT" "${OPT_LONG[@]}" -- "$@"; then
echo; usage; exit 1 # E_INVALID_OPTION;
exit 1 # E_INVALID_OPTION;
fi
set -- "${OPTRET[@]}"
unset OPT_SHORT OPT_LONG OPTRET