summaryrefslogtreecommitdiffstats
path: root/scripts/makepkg.in
diff options
context:
space:
mode:
authorAndrew Fyfe <andrew@neptune-one.net>2007-04-02 00:55:01 +0100
committerDan McGee <dan@archlinux.org>2007-04-01 21:52:28 -0400
commit9c9e18ef32c0cf3fe33ed251d28c70651bb85f65 (patch)
treee5f0dced39295c5e8a22b0a170d82b8d2bba0af1 /scripts/makepkg.in
parentea3a182dbfed4975eb5f2950b1c66bef53707f9a (diff)
downloadpacman-9c9e18ef32c0cf3fe33ed251d28c70651bb85f65.tar.xz
Tidy up usage of makepkg.conf
Moved the following variables into /etc/makepkg.conf * BUILDSCRIPT * PKGEXT * DB_COMPRESSION * DB_CHECKSUMS Cleaned up sourcing of /etc/makepkg.conf in scripts and source ~/.makepkg.conf if it exists. Signed-off-by: Andrew Fyfe <andrew@neptune-one.net> Signed-off-by: Dan McGee <dan@archlinux.org>
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