Permalink
Browse files

Merge pull request #61 from rlipman/master

Add PACMAN_CLIENT environment variable
  • Loading branch information...
bruenig committed Feb 8, 2012
2 parents f3e30c1 + 46202a0 commit fe90beaeb81e34b79fd08fe895050db465f06795
Showing with 7 additions and 5 deletions.
  1. +7 −5 packer
View
12 packer
@@ -2,6 +2,8 @@
# Copyright Matthew Bruenig <matthewbruenig@gmail.com>
# Licensed under GPL version 3
+[ -z $PACMAN_CLIENT ] && PACMAN_CLIENT="pacman"
+
# set tmpfile stuff, clean tmpdir
tmpdir="${TMPDIR:-/tmp}/packertmp-$UID"
rm -rf "$tmpdir" &>/dev/null
@@ -296,9 +298,9 @@ aurinstall() {
[[ $? -ne 0 ]] && echo "The build failed." && return 1
if [[ $2 = dependency ]]; then
- runasroot pacman ${PACOPTS[@]} --asdeps -U $pkgname-*$PKGEXT
+ runasroot $PACMAN_CLIENT ${PACOPTS[@]} --asdeps -U $pkgname-*$PKGEXT
elif [[ $2 = explicit ]]; then
- runasroot pacman ${PACOPTS[@]} -U $pkgname-*$PKGEXT
+ runasroot $PACMAN_CLIENT ${PACOPTS[@]} -U $pkgname-*$PKGEXT
fi
}
@@ -351,7 +353,7 @@ installhandling() {
# First install the explicit pacman packages, let pacman prompt
if [[ $pacmanpackages ]]; then
- runasroot pacman "${PACOPTS[@]}" -S -- "${pacmanpackages[@]}"
+ runasroot $PACMAN_CLIENT "${PACOPTS[@]}" -S -- "${pacmanpackages[@]}"
fi
if [[ -z $aurtargets ]]; then
exit
@@ -397,7 +399,7 @@ installhandling() {
# Install pacman dependencies
if [[ $pacmandepends ]]; then
- runasroot pacman --noconfirm --asdeps -S -- "${pacmandepends[@]}" || err "Installation failed."
+ runasroot $PACMAN_CLIENT --noconfirm --asdeps -S -- "${pacmandepends[@]}" || err "Installation failed."
fi
# Install aur dependencies
@@ -477,7 +479,7 @@ if [[ $option = update ]]; then
sourcemakepkgconf
# Pacman update
if ! [[ $auronly ]]; then
- runasroot pacman "${PACOPTS[@]}" "$pacmanarg"
+ runasroot $PACMAN_CLIENT "${PACOPTS[@]}" "$pacmanarg"
fi
# Aur update

0 comments on commit fe90bea

Please sign in to comment.