[pacman-dev] CVS update of pacman-lib/scripts (makepkg)

Aaron Griffin aaron at archlinux.org
Thu Jan 25 20:26:09 EST 2007


    Date: Thursday, January 25, 2007 @ 20:26:09
  Author: aaron
    Path: /home/cvs-pacman/pacman-lib/scripts

Modified: makepkg (1.34 -> 1.35)

James Rosten <seinfeld90 at gmail.com>
* Use PKGDEST and SRCDEST from the environment (if defined) when calling makepkg


---------+
 makepkg |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)


Index: pacman-lib/scripts/makepkg
diff -u pacman-lib/scripts/makepkg:1.34 pacman-lib/scripts/makepkg:1.35
--- pacman-lib/scripts/makepkg:1.34	Tue Jan 23 11:02:37 2007
+++ pacman-lib/scripts/makepkg	Thu Jan 25 20:26:08 2007
@@ -27,7 +27,6 @@
 
 myver='3.0.0'
 startdir=$(pwd)
-PKGDEST=$startdir
 
 BUILDSCRIPT="PKGBUILD"
 PKGEXT="pkg.tar.gz"
@@ -314,6 +313,11 @@
 
 ARGLIST=$@
 
+#preserve environment variables
+PKGDEST=${PKGDEST:-$startdir} #default to $startdir if undefined
+_PKGDEST=${PKGDEST}
+_SRCDEST=$SRCDEST
+
 #Source makepkg.conf; fail if it is not found
 if [ -f /etc/makepkg.conf ]; then
 	source /etc/makepkg.conf
@@ -327,6 +331,10 @@
 	source ~/.makepkg.conf
 fi
 
+# override settings with an environment variable for batch processing
+PKGDEST=${_PKGDEST:-$PKGDEST}
+SRCDEST=${_SRCDEST:-$SRCDEST}
+
 while [ "$#" -ne "0" ]; do
 	case $1 in
 		# pacman




More information about the pacman-dev mailing list