From 67485704135ef41d907a4c93db5fbcaee3960bc2 Mon Sep 17 00:00:00 2001 From: Travis Willard Date: Sun, 13 Jan 2008 14:53:29 -0500 Subject: Improve makepkg config loading for checkpkg and extrapkg. Now, checkpkg and extrapkg will fail if /etc/makepkg.conf doesn't exist, and will also try to load in personal user's settings in ~/.makepkg.conf Signed-off-by: Travis Willard Signed-off-by: Aaron Griffin --- checkpkg | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'checkpkg') diff --git a/checkpkg b/checkpkg index cd08121..2cffa78 100755 --- a/checkpkg +++ b/checkpkg @@ -1,6 +1,17 @@ #!/bin/bash -source /etc/makepkg.conf +# Source makepkg.conf; fail if it is not found +if [ -r "/etc/makepkg.conf" ]; then + source "/etc/makepkg.conf" +else + echo "/etc/makepkg.conf not found!" + exit 1 +fi + +# Source user-specific makepkg.conf overrides +if [ -r ~/.makepkg.conf ]; then + source ~/.makepkg.conf +fi strip_url() { echo $1 | sed 's|^.*://.*/||g' -- cgit v1.2.3-70-g09d2