makepkg: Remove OPT_TEMP hack in parse_options call
Instead of hacking around the error trap, simply do an explicit test for failure. Signed-off-by: DJ Mills <danielmills1@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
af357d6ab0
commit
7f5b24597b
1 changed files with 1 additions and 3 deletions
|
@ -1756,9 +1756,7 @@ OPT_LONG+=",install,key:,log,nocolor,nobuild,nocheck,nosign,pkg:,rmdeps"
|
||||||
OPT_LONG+=",repackage,skipinteg,sign,source,syncdeps,version,config:"
|
OPT_LONG+=",repackage,skipinteg,sign,source,syncdeps,version,config:"
|
||||||
# Pacman Options
|
# Pacman Options
|
||||||
OPT_LONG+=",noconfirm,noprogressbar"
|
OPT_LONG+=",noconfirm,noprogressbar"
|
||||||
OPT_TEMP="$(parse_options $OPT_SHORT $OPT_LONG "$@" || echo 'PARSE_OPTIONS FAILED')"
|
if ! OPT_TEMP="$(parse_options $OPT_SHORT $OPT_LONG "$@")"; then
|
||||||
if [[ $OPT_TEMP = *'PARSE_OPTIONS FAILED'* ]]; then
|
|
||||||
# This is a small hack to stop the script bailing with 'set -e'
|
|
||||||
echo; usage; exit 1 # E_INVALID_OPTION;
|
echo; usage; exit 1 # E_INVALID_OPTION;
|
||||||
fi
|
fi
|
||||||
eval set -- "$OPT_TEMP"
|
eval set -- "$OPT_TEMP"
|
||||||
|
|
Loading…
Add table
Reference in a new issue