From f6d97da70dfde16f2e4d5e582c7b3a5116a47860 Mon Sep 17 00:00:00 2001 From: Judd Vinet Date: Sat, 28 Jan 2006 02:24:25 +0000 Subject: use sudo for -i if available (fw) --- scripts/makepkg | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'scripts/makepkg') 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 -- cgit v1.2.3-70-g09d2