From 1def746ad5f1024c78db1935fe3baa93fe160cd1 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Fri, 26 Jan 2007 01:26:08 +0000 Subject: James Rosten * Use PKGDEST and SRCDEST from the environment (if defined) when calling makepkg --- scripts/makepkg | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/makepkg b/scripts/makepkg index 9f034b96..750b0e5f 100755 --- a/scripts/makepkg +++ b/scripts/makepkg @@ -27,7 +27,6 @@ myver='3.0.0' startdir=$(pwd) -PKGDEST=$startdir BUILDSCRIPT="PKGBUILD" PKGEXT="pkg.tar.gz" @@ -314,6 +313,11 @@ usage() { 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 @@ if [ -f ~/.makepkg.conf ]; then 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 -- cgit v1.2.3-54-g00ecf