From 7f5b24597bec4d74328c62467ad778f7eaae75a1 Mon Sep 17 00:00:00 2001 From: DJ Mills Date: Fri, 8 Jul 2011 00:31:23 -0400 Subject: 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 Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'scripts/makepkg.sh.in') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 5d9a382c..5e5a977a 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1756,9 +1756,7 @@ OPT_LONG+=",install,key:,log,nocolor,nobuild,nocheck,nosign,pkg:,rmdeps" OPT_LONG+=",repackage,skipinteg,sign,source,syncdeps,version,config:" # Pacman Options OPT_LONG+=",noconfirm,noprogressbar" -OPT_TEMP="$(parse_options $OPT_SHORT $OPT_LONG "$@" || echo 'PARSE_OPTIONS FAILED')" -if [[ $OPT_TEMP = *'PARSE_OPTIONS FAILED'* ]]; then - # This is a small hack to stop the script bailing with 'set -e' +if ! OPT_TEMP="$(parse_options $OPT_SHORT $OPT_LONG "$@")"; then echo; usage; exit 1 # E_INVALID_OPTION; fi eval set -- "$OPT_TEMP" -- cgit v1.2.3-24-g4f1b