summaryrefslogtreecommitdiffstats
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-02-16 04:50:51 +0100
committerDan McGee <dan@archlinux.org>2012-02-17 00:31:16 +0100
commitca4142714137b16feabac09c4cda86b0a75036f8 (patch)
tree76706d41581a2f764ba9c51f4d5ae151bcedae6a /scripts/makepkg.sh.in
parent242006933d31c88b844f8f8d0c2f0806763cc51f (diff)
downloadpacman-ca4142714137b16feabac09c4cda86b0a75036f8.tar.gz
pacman-ca4142714137b16feabac09c4cda86b0a75036f8.tar.xz
parseopts: normalize options into an array
Modify parse_options logic to fill an array instead of printing parsed options. Avoid eval like the plague. Because it is the plague. Fixes bugs such as FS#28445. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 9766c8c6..805c31a9 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1906,11 +1906,11 @@ OPT_LONG+=",version,config:"
# Pacman Options
OPT_LONG+=",noconfirm,noprogressbar"
-if ! OPT_TEMP="$(parse_options $OPT_SHORT $OPT_LONG "$@")"; then
+if ! parse_options $OPT_SHORT $OPT_LONG "$@"; then
echo; usage; exit 1 # E_INVALID_OPTION;
fi
-eval set -- "$OPT_TEMP"
-unset OPT_SHORT OPT_LONG OPT_TEMP
+set -- "${OPTRET[@]}"
+unset OPT_SHORT OPT_LONG OPTRET
while true; do
case "$1" in