summaryrefslogtreecommitdiffstats
path: root/extrapkg
diff options
context:
space:
mode:
authorTravis Willard <travis@archlinux.org>2008-01-13 20:53:29 +0100
committerAaron Griffin <aaronmgriffin@gmail.com>2008-01-23 23:11:38 +0100
commit67485704135ef41d907a4c93db5fbcaee3960bc2 (patch)
tree51dbc73113e967c04a92ed204cf1e58bb16e43c3 /extrapkg
parentd853dee3ed47c30497e0c97d0c7962c4d196dde9 (diff)
downloaddevtools-67485704135ef41d907a4c93db5fbcaee3960bc2.tar.gz
devtools-67485704135ef41d907a4c93db5fbcaee3960bc2.tar.xz
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 <travis@archlinux.org> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'extrapkg')
-rwxr-xr-xextrapkg13
1 files changed, 12 insertions, 1 deletions
diff --git a/extrapkg b/extrapkg
index 437b330..e4708ac 100755
--- a/extrapkg
+++ b/extrapkg
@@ -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
cmd=`basename $0`