From 5585e53e87d2d8c590b49584dfc69c32eff5d52e Mon Sep 17 00:00:00 2001 From: Willy Sudiarto Raharjo Date: Sun, 22 Mar 2020 15:45:42 +0700 Subject: [PATCH] sqg: Use local configuration after system-wide configuration. Signed-off-by: Willy Sudiarto Raharjo --- src/usr/libexec/sbopkg/sqg/functions | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/usr/libexec/sbopkg/sqg/functions b/src/usr/libexec/sbopkg/sqg/functions index 3c2ebb3..9a471fc 100644 --- a/src/usr/libexec/sbopkg/sqg/functions +++ b/src/usr/libexec/sbopkg/sqg/functions @@ -12,17 +12,18 @@ SQG_TMP_DIR=${SQG_TMP_DIR:-/tmp/sqg} # - directory checks # sanity_checks () { - # if local configuration exist, we will use it first - if [ -e "$LOCAL_SBOPKG_CONF" ]; then - echo "Using local configuration in $LOCAL_SBOPKG_CONF" - . $LOCAL_SBOPKG_CONF - elif [ ! -e "$SBOPKG_CONF" ]; then + if [ ! -e "$SBOPKG_CONF" ]; then echo "$SBOPKG_CONF not found." echo "Check the configurable variables at the top of the script." exit 1 else - echo "Using system wide configuration in $SBOPKG_CONF" + echo "Setting system wide configuration in $SBOPKG_CONF" . $SBOPKG_CONF + # if local configuration exist, use those instead + if [ -e "$LOCAL_SBOPKG_CONF" ]; then + echo "Overriding with local configuration in $LOCAL_SBOPKG_CONF" + . $LOCAL_SBOPKG_CONF + fi fi # check whether we are using git or rsync