From 969dcddbdf9d5dbd91aa414cdd193f3fb26b644b Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 20 Mar 2012 09:02:56 -0400 Subject: 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 Signed-off-by: Dan McGee --- scripts/library/parse_options.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') 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 -- cgit v1.2.3-54-g00ecf