summaryrefslogtreecommitdiff
path: root/src/libretools.conf
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-11-28 19:17:00 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-11-28 19:17:00 -0500
commit144466aaa12ef0aed8a53767becae6033df9b3cf (patch)
treef9a9d17005385dfbc1d5214cf28a41a0e2abf709 /src/libretools.conf
parent4e5d7c05ada2181ce0aa3bed0ba734f4e1ae70cb (diff)
libretools.conf: set LIBREUSER and LIBREHOME
Diffstat (limited to 'src/libretools.conf')
-rw-r--r--src/libretools.conf10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/libretools.conf b/src/libretools.conf
index bef9fc4..20c7d90 100644
--- a/src/libretools.conf
+++ b/src/libretools.conf
@@ -107,14 +107,10 @@ TORUPATH=/var/lib/libretools/toru
# This probably shouldn't be in a .conf file... #
################################################################################
+LIBREUSER="${SUDO_USER:-$USER}"
+LIBREHOME="$(eval echo ~$SUDO_USER)"
if [[ -z $XDG_CONFIG_HOME ]]; then
- if [[ -n $SUDO_USER ]]; then
- SUDO_HOME="$(eval echo ~$SUDO_USER)"
- export XDG_CONFIG_HOME="${SUDO_HOME}/.config"
- unset SUDO_HOME
- else
- export XDG_CONFIG_HOME="${HOME}/.config"
- fi
+ export XDG_CONFIG_HOME="${LIBREHOME}/.config"
fi
if [[ -e "$XDG_CONFIG_HOME/libretools/libretools.conf" ]]; then
. "$XDG_CONFIG_HOME/libretools/libretools.conf"