From f9558ffccc843f1968e969e27555abb7ca813e11 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 4 Jan 2013 11:36:03 -0500 Subject: move checks from libretools.conf to conf.sh --- src/libretools.conf | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) (limited to 'src/libretools.conf') diff --git a/src/libretools.conf b/src/libretools.conf index f3e567a..b1a6e6e 100644 --- a/src/libretools.conf +++ b/src/libretools.conf @@ -91,34 +91,15 @@ HOOKPRERELEASE="ssh -fN parabola" TORUPATH=/var/lib/libretools/toru ################################################################################ -# This probably shouldn't be in a .conf file... # +# Stub for old programs; wouldn't normally be in a .conf file # ################################################################################ if [[ -z ${INCLUDE_CONF_SH:-} ]]; then - -LIBREUSER="${SUDO_USER:-$USER}" -LIBREHOME="$(eval echo ~$LIBREUSER)" -if [[ -z ${XDG_CONFIG_HOME:-} ]]; then - export XDG_CONFIG_HOME="${LIBREHOME}/.config" -fi -if [[ -e "$XDG_CONFIG_HOME/libretools/libretools.conf" ]]; then - . "$XDG_CONFIG_HOME/libretools/libretools.conf" -fi - -ret=0 -for VAR in PARABOLAHOST LIBREDESTDIR \ - BLACKLIST WORKDIR REPOS ARCHES ABSLIBREGIT \ - COMMITCMD DIFFTOOL FULLBUILDCMD SIGEXT SIGID; do - if [[ -z ${!VAR} ]]; then - echo "Configure $VAR var in /etc/libretools.conf" - ret=1 + . /usr/share/libretools/conf.sh + if [[ -e "$XDG_CONFIG_HOME/libretools/libretools.conf" ]]; then + . "$XDG_CONFIG_HOME/libretools/libretools.conf" fi -done -if [[ $ret != 0 ]]; then - exit 1 -fi -unset ret - -. /usr/bin/libremessages + check_conf_libretools || exit $? + . /usr/bin/libremessages fi -- cgit v1.2.3-54-g00ecf