summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2006-01-28 02:24:25 +0000
committerJudd Vinet <judd@archlinux.org>2006-01-28 02:24:25 +0000
commitf6d97da70dfde16f2e4d5e582c7b3a5116a47860 (patch)
tree9aaa70c33d931a214b6ee75abfd4f3b6b334432e
parentcb969451809b135d1363ba3964530bfb65f028fb (diff)
downloadpacman-f6d97da70dfde16f2e4d5e582c7b3a5116a47860.tar.xz
use sudo for -i if available (fw)
-rwxr-xr-xscripts/makepkg11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/makepkg b/scripts/makepkg
index 51980005..7a387320 100755
--- a/scripts/makepkg
+++ b/scripts/makepkg
@@ -777,6 +777,17 @@ if [ "$INSTALL" = "1" -a "`id -u`" = "0" -a "$INFAKEROOT" != "1" ]; then
msg "Running pacman --upgrade..."
pacman --upgrade $PKGDEST/${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz
exit $?
+elif [ "$INSTALL" = "1" -a "$DEP_SUDO" = "1" ]; then
+ msg "Running pacman --upgrade..."
+ if [ "$INFAKEROOT" = "1" ]; then
+ FAKEROOTKEY2=$FAKEROOTKEY
+ unset FAKEROOTKEY
+ fi
+ sudo pacman --upgrade $PKGDEST/${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz
+ if [ "$INFAKEROOT" = "1" ]; then
+ export FAKEROOTKEY=$FAKEROOTKEY2
+ unset FAKEROOTKEY2
+ fi
fi
exit 0