summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-06-01 10:56:54 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-06-01 10:56:54 +0200
commitc09b71a309e2aa26a8ef56c7f64eb31d24ed7c34 (patch)
tree7cd14be60e211af191fa8db3b674b380c8aae85a
parent06d1b08129e653555ecec3d16079e990103babd1 (diff)
bootstrap: Save config in $XDG_CONFIG_HOME by default
-rwxr-xr-xinclude/bootstrap8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/bootstrap b/include/bootstrap
index 621cc8e..bccf868 100755
--- a/include/bootstrap
+++ b/include/bootstrap
@@ -7,6 +7,7 @@
typeset -i rcempty=0
typeset PKG_ROOT PKG_DIR default_path='~/packages'
+: ${XDG_CONFIG_HOME=$HOME/.config}
if [[ -n $1 ]] {
PKG_ROOT=$1
@@ -48,8 +49,11 @@ git clone $PKG_ROOT/core
cd core || exit 1
echo 'Writing pkg.conf'
-echo "PKG_ROOT='$PKG_ROOT'" > ~/.pkg.conf
-echo "PKG_DIR=\"${PKG_DIR/$HOME/\$HOME}\"" >> ~/.pkg.conf
+mkdir -p $XDG_CONFIG_HOME/pkg
+cat > $XDG_CONFIG_HOME/pkg/pkg.conf <<- flurbl
+ PKG_ROOT='$PKG_ROOT'
+ PKG_DIR=\"${PKG_DIR/$HOME/\$HOME}\"
+flurbl
echo 'Installing core package'
rehash