diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-11-28 19:17:00 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-11-28 19:17:00 -0500 |
commit | 144466aaa12ef0aed8a53767becae6033df9b3cf (patch) | |
tree | f9a9d17005385dfbc1d5214cf28a41a0e2abf709 /src/libretools.conf | |
parent | 4e5d7c05ada2181ce0aa3bed0ba734f4e1ae70cb (diff) |
libretools.conf: set LIBREUSER and LIBREHOME
Diffstat (limited to 'src/libretools.conf')
-rw-r--r-- | src/libretools.conf | 10 |
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" |