diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-03-20 09:02:56 -0400 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-04-07 10:13:37 -0500 |
commit | 969dcddbdf9d5dbd91aa414cdd193f3fb26b644b (patch) | |
tree | 6d4cf6e2c2d8b2af12d86643a2cce04211b803c3 /scripts/library | |
parent | 72ba4fb83ff99031f58169beeb1daa80ffd8cdb4 (diff) |
parse_options: initialize unused_options as array
Since we treat this as an array, we need to initialize it as one. This
avoids addition of an empty element to the option string when we set the
option array from the calling program, e.g.
+/usr/bin/makepkg[2033]: set -- -i --pkg vim -- ''
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/library')
-rw-r--r-- | scripts/library/parse_options.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/library/parse_options.sh b/scripts/library/parse_options.sh index 39038de6..d57443b0 100644 --- a/scripts/library/parse_options.sh +++ b/scripts/library/parse_options.sh @@ -3,7 +3,7 @@ parse_options() { local short_options=$1; shift; local long_options=$1; shift; local ret=0; - local unused_options="" + local unused_options=() local i while [[ -n $1 ]]; do |