summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-06-01 16:44:27 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-06-05 20:01:05 -0600
commit8e4f38133dc6b0a91d16ac5a7a3ff78ba1e24727 (patch)
tree973a2adc7628b2a680e08b833fa5dfbccbf24427 /src
parentc129ad75fceba7eb980874bb15954a1889d1f33a (diff)
lib/conf.sh: respect a customized HOME variable
Diffstat (limited to 'src')
-rw-r--r--src/lib/conf.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/conf.sh b/src/lib/conf.sh
index b9e8698..845f4c1 100644
--- a/src/lib/conf.sh
+++ b/src/lib/conf.sh
@@ -18,7 +18,11 @@
INCLUDE_CONF_SH=conf.sh
LIBREUSER="${SUDO_USER:-$USER}"
-LIBREHOME="$(eval echo ~$LIBREUSER)"
+if [[ $LIBREUSER == $USER ]]; then
+ LIBREHOME=$HOME
+else
+ LIBREHOME="$(eval echo ~$LIBREUSER)"
+fi
if [[ -z ${XDG_CONFIG_HOME:-} ]]; then
export XDG_CONFIG_HOME="${LIBREHOME}/.config"
fi