From ec15e859a4e69681cf6d1a5808ecc8a619e91a55 Mon Sep 17 00:00:00 2001
From: Xyne <xyne@archlinux.ca>
Date: Tue, 17 Sep 2013 09:19:24 +0000
Subject: bacman: pass unshifted arguments to fakeroot

Signed-off-by: Allan McRae <allan@archlinux.org>
---
 contrib/bacman.sh.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'contrib')

diff --git a/contrib/bacman.sh.in b/contrib/bacman.sh.in
index 33e3920a..d832fb8f 100644
--- a/contrib/bacman.sh.in
+++ b/contrib/bacman.sh.in
@@ -27,6 +27,8 @@ shopt -s nullglob
 declare -r myname='bacman'
 declare -r myver='@PACKAGE_VERSION@'
 USE_COLOR='y'
+# Required for fakeroot because options are shifted off the array.
+ARGS=("$@")
 
 m4_include(../scripts/library/output_format.sh)
 
@@ -71,7 +73,7 @@ if (( EUID )); then
 	if [[ -f /usr/bin/fakeroot ]]; then
 		msg "Entering fakeroot environment"
 		export INFAKEROOT="1"
-		/usr/bin/fakeroot -u -- "$0" "$@"
+		/usr/bin/fakeroot -u -- "$0" "${ARGS[@]}"
 		exit $?
 	else
 		warning "installing fakeroot or running $myname as root is required to"
-- 
cgit v1.2.3-70-g09d2