summaryrefslogtreecommitdiff
path: root/scripts/makepkg
diff options
context:
space:
mode:
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