summaryrefslogtreecommitdiff
path: root/src/libretools.conf
diff options
context:
space:
mode:
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"