From fff6d9dc2e6c61f67d6a50e2dde655f388c173a8 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Thu, 22 Oct 2009 14:25:24 +1000 Subject: makepkg: allow passing arguments with spaces Currently makepkg takes the commandline arguments, assigns them to a variable and passes that variable to the next makepkg call (within fakeroot). Use a comination of quotes and arrays in this process to ensure any arguments passed within quotes and containing spaces stay as a single argument during the second makepkg call. Thanks to Dan for figuring out how to get this working. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index ffa8e866..ba0d3d91 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1462,7 +1462,7 @@ if [ ! $(type -t gettext) ]; then } fi -ARGLIST=$@ +ARGLIST=("$@") # Parse Command Line Options. OPT_SHORT="AcCdefFghiLmop:rRsV" @@ -1876,9 +1876,9 @@ else msg "$(gettext "Entering fakeroot environment...")" if [ -n "$newpkgver" ]; then - fakeroot -- $0 --forcever $newpkgver -F $ARGLIST || exit $? + fakeroot -- $0 --forcever $newpkgver -F "${ARGLIST[@]}" || exit $? else - fakeroot -- $0 -F $ARGLIST || exit $? + fakeroot -- $0 -F "${ARGLIST[@]}" || exit $? fi fi fi -- cgit v1.2.3-54-g00ecf