diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-02-15 22:50:51 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-02-16 17:31:16 -0600 |
commit | ca4142714137b16feabac09c4cda86b0a75036f8 (patch) | |
tree | 76706d41581a2f764ba9c51f4d5ae151bcedae6a /scripts/makepkg.sh.in | |
parent | 242006933d31c88b844f8f8d0c2f0806763cc51f (diff) |
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.in | 6 |
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 |