index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dave Reisner <d@falconindy.com> | 2011-06-22 17:53:06 -0400 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-24 00:02:06 -0500 |
commit | e27a5c88514c5eb9480294374e98914ec27bf65d (patch) | |
tree | f0e523526c99017020a5cb5acd0ccff04020e43e /scripts | |
parent | ac7d17f88e200f3f1c213474e7b875ecd341753d (diff) |
-rw-r--r-- | scripts/library/parse_options.sh | 13 |
diff --git a/scripts/library/parse_options.sh b/scripts/library/parse_options.sh index 8057c288..5ced2606 100644 --- a/scripts/library/parse_options.sh +++ b/scripts/library/parse_options.sh @@ -70,17 +70,8 @@ parse_options() { done printf " --" - if [[ -n $unused_options ]]; then - for i in ${unused_options[@]}; do - printf ' %s' "$i" - done - fi - if [[ -n $1 ]]; then - while [[ -n $1 ]]; do - printf " '%s'" "${1}" - shift - done - fi + [[ $unused_options ]] && printf ' %s' "${unused_options[@]}" + [[ $1 ]] && printf " '%s'" "$@" printf "\n" return $ret |