[pacman-dev] added --config option to makepkg

hoar heor archye at pycut.com.ar
Thu Aug 7 10:20:30 EDT 2008


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 <ilcra1989 at gmail.com>
Date: Thu, 7 Aug 2008 16:18:10 +0200
Subject: [PATCH] added custom config location option

Signed-off-by: Imanol Celaya <ilcra1989 at gmail.com>
---
 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



More information about the pacman-dev mailing list