]> pd.if.org Git - zpackage/commitdiff
read in global and local config file in zpm dispatcher
authorNathan Wagner <nw@hydaspes.if.org>
Wed, 28 Sep 2016 23:43:55 +0000 (23:43 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Wed, 28 Sep 2016 23:43:55 +0000 (23:43 +0000)
zpm

diff --git a/zpm b/zpm
index 13f4c8e331b738112f0469598e4cfec7bd6c1e76..a761d8f98c2daa93cd540847e56cf64d95a5c12f 100755 (executable)
--- a/zpm
+++ b/zpm
@@ -9,6 +9,14 @@ die() {
        exit 1;
 }
 
+# parse command line options
+
+# read in config files
+
+test -r /etc/zpmrc && . /etc/zpmrc
+test -r $HOME/.zpmrc && . $HOME/zpmrc
+test -r .zpmrc && . .zpmrc
+
 case $cmd in
        help)
                ecmd=$(command -v "zpm-$cmd") && { exec "$ecmd" "$@" || die "$0: unknown command zpm help"; }