options-parser: keep non-option arguments separate!

* build-aux/options-parser (func_parse_options): When there is
more than one non-option argument, "$*" forces all of them into
a single string.  Use ${1+"$@"} to set arguments correctly.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
This commit is contained in:
Gary V. Vaughan 2012-10-11 00:32:10 +07:00
parent ff7555a5aa
commit 95e3f5ee75

View File

@ -495,7 +495,7 @@ func_parse_options ()
--) set dummy "$_G_opt" "*"; shift; break ;;
-*) func_fatal_help "unrecognised option: \`$_G_opt'" ;;
*) set dummy "$_G_opt" "$*"; shift; break ;;
*) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
esac
done