summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXyne <xyne@archlinux.ca>2013-09-17 09:19:24 +0000
committerAllan McRae <allan@archlinux.org>2013-09-18 14:28:03 +1000
commitec15e859a4e69681cf6d1a5808ecc8a619e91a55 (patch)
treef5a35cb967f8840a549c02021ef0e01ca3f4ef54
parent3b3152fc501a1561d733c33557ff2f7be8376067 (diff)
downloadpacman-ec15e859a4e69681cf6d1a5808ecc8a619e91a55.tar.xz
bacman: pass unshifted arguments to fakeroot
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--contrib/bacman.sh.in4
1 files changed, 3 insertions, 1 deletions
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"