From 9c9e18ef32c0cf3fe33ed251d28c70651bb85f65 Mon Sep 17 00:00:00 2001 From: Andrew Fyfe Date: Mon, 2 Apr 2007 00:55:01 +0100 Subject: 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 Signed-off-by: Dan McGee --- scripts/repo-add | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'scripts/repo-add') diff --git a/scripts/repo-add b/scripts/repo-add index dc280161..8b81c34e 100755 --- a/scripts/repo-add +++ b/scripts/repo-add @@ -23,9 +23,6 @@ myver='3.0.0' FORCE=0 REPO_DB_FILE="" - -DB_COMPRESSION="gz" #TODO this is gross -DB_CHECKSUMS=(md5) TMP_DIR="" # print usage instructions @@ -224,6 +221,18 @@ if [ $# -lt 2 ]; then exit 1 fi +# source system and user makepkg.conf +if [ -r /etc/makepkg.conf ]; then + source /etc/makepkg.conf +else + echo "ERROR: /etc/makepkg.conf not found. Can not continue." >&2 + exit 1 # $E_CONFIG_ERROR # TODO: error codes +fi + +if [ -r ~/.makepkg.conf ]; then + source ~/.makepkg.conf +fi + # main routine if [ $# -gt 1 ]; then gstmpdir=$(mktemp -d /tmp/gensync.XXXXXXXXXX) || (\ -- cgit v1.2.3-54-g00ecf