From 8e4f38133dc6b0a91d16ac5a7a3ff78ba1e24727 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 1 Jun 2013 16:44:27 -0600 Subject: lib/conf.sh: respect a customized HOME variable --- src/lib/conf.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/lib') 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 -- cgit v1.2.3-54-g00ecf