Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-07-02 18:29:37 -0500
committerDan McGee <dan@archlinux.org>2010-07-02 18:29:37 -0500
commit686b8c146398c5ba9feee2c1fa10bf9e598b2ce8 (patch)
tree0353500bc444ac60cef120ea6d722c94badfe8ca /scripts
parent1a9db4cac7cf308188298db48dde5d80ce86a7e9 (diff)
parentfcb4f0264f2b8e0a6ed1e7eebfe00f662ba94ef2 (diff)
Merge branch 'maint'
Conflicts: scripts/makepkg.sh.in
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in13
1 files changed, 6 insertions, 7 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index efc56912..9f3bbb2c 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -370,17 +370,16 @@ download_file() {
}
run_pacman() {
- local ret=0
+ local cmd
+ printf -v cmd "%q " "$PACMAN" $PACMAN_OPTS "$@"
if (( ! ASROOT )) && [[ $1 != "-T" && $1 != "-Qq" ]]; then
- if type -p sudo >/dev/null && sudo -l $PACMAN &>/dev/null; then
- sudo $PACMAN $PACMAN_OPTS "$@" || ret=$?
+ if [ "$(type -p sudo)" ]; then
+ cmd="sudo $cmd"
else
- su -c "$PACMAN $PACMAN_OPTS $*" || ret=$?
+ cmd="su -c '$cmd'"
fi
- else
- $PACMAN $PACMAN_OPTS "$@" || ret=$?
fi
- return $ret
+ eval "$cmd"
}
check_deps() {