Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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