summaryrefslogtreecommitdiff
path: root/scripts/makepkg
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 /scripts/makepkg
parentcb969451809b135d1363ba3964530bfb65f028fb (diff)
use sudo for -i if available (fw)
Diffstat (limited to 'scripts/makepkg')
-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