summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-05-28 10:49:00 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-05-28 10:49:00 +0200
commit06d1b08129e653555ecec3d16079e990103babd1 (patch)
tree59732cc0c4f1072251c35b3efb5cde98bc30ba0d
parentcb1e2ac062c8f00fce0fe0d62ce784d9c1d9e3f5 (diff)
pkg: Support the XDG basedir spec as well (~/.config/pkg/pkg.conf)
-rwxr-xr-xbin/pkg4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/pkg b/bin/pkg
index 5ffe1b8..172c648 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -70,7 +70,9 @@ function clear_line {
}
# Read local configuration
-if [[ -r $HOME/.pkg.conf ]] {
+if [[ -r ${XDG_CONFIG_HOME-$HOME/.config/pkg/pkg.conf} ]] {
+ source ${XDG_CONFIG_HOME-$HOME/.config/pkg/pkg.conf}
+} elif [[ -r $HOME/.pkg.conf ]] {
source $HOME/.pkg.conf
}