Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/makepkg.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/makepkg.in')
-rwxr-xr-xscripts/makepkg.in25
1 files changed, 15 insertions, 10 deletions
diff --git a/scripts/makepkg.in b/scripts/makepkg.in
index 17a500bc..62a2a444 100755
--- a/scripts/makepkg.in
+++ b/scripts/makepkg.in
@@ -36,11 +36,16 @@ export TEXTDOMAINDIR
myver='3.0.0'
startdir=$(pwd)
-BUILDSCRIPT="PKGBUILD"
-PKGEXT="pkg.tar.gz"
-
-source "/etc/abs/abs.conf"
-SRCROOT="$ABSROOT"
+# Only use ABSROOT if we haven't been passed a SRCROOT on the command line.
+if [ -z "$SRCROOT" ]; then
+ if [ -r /etc/abs/abs.conf ]; then
+ source /etc/abs/abs.conf
+ fi
+ if [ -r ~/.abs.conf ]; then
+ source ~/.abs.conf
+ fi
+ SRCROOT=$ABSROOT
+fi
# Options
CLEANUP=0
@@ -418,16 +423,16 @@ ARGLIST=$@
_PKGDEST=${PKGDEST}
_SRCDEST=${SRCDEST}
-#Source makepkg.conf; fail if it is not found
-if [ -f /etc/makepkg.conf ]; then
+# Source makepkg.conf; fail if it is not found
+if [ -r /etc/makepkg.conf ]; then
source /etc/makepkg.conf
else
error "$(gettext "/etc/makepkg.conf not found. cannot continue")"
- exit 1
+ exit 1 # $E_CONFIG_ERROR # TODO: error codes
fi
-#Source user-specific makepkg.conf overrides
-if [ -f ~/.makepkg.conf ]; then
+# Source user-specific makepkg.conf overrides
+if [ -r ~/.makepkg.conf ]; then
source ~/.makepkg.conf
fi