[devtools,4/8] makechrootpkg: /chrootbuild: accept makepkg_args as arguments rather than embedding.

Message ID 20170402081002.28176-5-lukeshu@lukeshu.com
State Accepted
Headers show
Series [devtools,1/8] Avoid using string interpolation; use printf format strings instead. | expand

Commit Message

Luke Shumaker April 2, 2017, 8:09 a.m. UTC
From: Luke Shumaker <lukeshu@parabola.nu>

---
 makechrootpkg.in | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Patch

diff --git a/makechrootpkg.in b/makechrootpkg.in
index 31d57d3..9566b2e 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -190,9 +190,7 @@  EOF
 	{
 		printf '#!/bin/bash\n'
 		declare -f _chrootbuild
-		printf '_chrootbuild'
-		printf ' %q' "${makepkg_args[@]}"
-		printf ' || exit\n'
+		printf '_chrootbuild "$@" || exit\n'
 
 		if $run_namcap; then
 			declare -f _chrootnamcap
@@ -338,7 +336,7 @@  if arch-nspawn "$copydir" \
 	--bind="$PWD:/startdir" \
 	--bind="$SRCDEST:/srcdest" \
 	"${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \
-	/chrootbuild
+	/chrootbuild "${makepkg_args[@]}"
 then
 	move_products
 else