here is a much simpler approach, now it takes any config file from any location.

>From 916f0b0f36e290138e20d59cd1f7f0245a436ffa Mon Sep 17 00:00:00 2001
From: Imanol Celaya <[EMAIL PROTECTED]>
Date: Thu, 7 Aug 2008 16:18:10 +0200
Subject: [PATCH] added custom config location option

Signed-off-by: Imanol Celaya <[EMAIL PROTECTED]>
---
 scripts/makepkg.sh.in |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 3604d10..72b9b7f 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1190,6 +1190,7 @@ while true; do
                -R|--repackage)   REPKG=1 ;;
                --source)         SOURCEONLY=1 ;;
                -s|--syncdeps)    DEP_BIN=1 ;;
+               --config)         shift; CONFLOCATION=$1 ;;

                -h|--help)        usage; exit 0 ;; # E_OK
                -V|--version)     version; exit 0 ;; # E_OK
@@ -1236,6 +1237,10 @@ if [ "$CLEANCACHE" = "1" ]; then
        fi
 fi

+if [ ! -z $CONFLOCATION ]; then
+       source $CONFLOCATION
+fi
+
 if [ -z $BUILDSCRIPT ]; then
        error "$(gettext "BUILDSCRIPT is undefined! Ensure you have updated
%s.")" "$confdir/makepkg.conf"
        exit 1
-- 
1.5.6.5
_______________________________________________
pacman-dev mailing list
[email protected]
http://archlinux.org/mailman/listinfo/pacman-dev

Reply via email to