summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDJ Mills <danielmills1@gmail.com>2011-07-08 06:31:23 +0200
committerDan McGee <dan@archlinux.org>2011-07-14 22:42:29 +0200
commit7f5b24597bec4d74328c62467ad778f7eaae75a1 (patch)
treebe2704087899b0fc92400bc937ce14bced2daabe /scripts
parentaf357d6ab00d8ca258dfd7abb689d6fd2eb4090f (diff)
downloadpacman-7f5b24597bec4d74328c62467ad778f7eaae75a1.tar.gz
pacman-7f5b24597bec4d74328c62467ad778f7eaae75a1.tar.xz
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in4
1 files changed, 1 insertions, 3 deletions
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"