summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-01-26 01:26:08 +0000
committerAaron Griffin <aaron@archlinux.org>2007-01-26 01:26:08 +0000
commit1def746ad5f1024c78db1935fe3baa93fe160cd1 (patch)
treea17f71d924955e906a99e6c2d467498adc0c0aa3 /scripts
parent7f465320e409b80a38ba11a72f4108a470003b35 (diff)
downloadpacman-1def746ad5f1024c78db1935fe3baa93fe160cd1.tar.xz
James Rosten <seinfeld90 at gmail.com>
* Use PKGDEST and SRCDEST from the environment (if defined) when calling makepkg
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/makepkg10
1 files changed, 9 insertions, 1 deletions
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