From 0c225a5c541c77f71164b3a4e5d0884b8ccaf901 Mon Sep 17 00:00:00 2001 From: Gorgone Date: Mon, 21 Sep 2020 10:31:23 +0200 Subject: [PATCH] Update _cmd_build change read config logic --- support/functions/_cmd_build | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/support/functions/_cmd_build b/support/functions/_cmd_build index 6247796..e33b7bc 100644 --- a/support/functions/_cmd_build +++ b/support/functions/_cmd_build @@ -126,20 +126,18 @@ _cmd_build(){ done #change default oscam CONF_DIR -if [ ! "$CUSTOM_CONFDIR" == "not_set" ] +if [ "$CUSTOM_CONFDIR" == "not_set" ] && [ "$_oscamconfdir_custom" == "not_set" ]; then - CONFDIR="$CUSTOM_CONFDIR" - cdtag="${r_l}custom CONF_DIR=$CONFDIR (via commandline)" -else - oc_size=${#_oscamconfdir_custom} - if [ "$oc_size" -gt "4" ] - then - CONFDIR="$_oscamconfdir_custom" - cdtag="${r_l}custom CONF_DIR=$CONFDIR (via toolchain.cfg)" - else - CONFDIR="$_oscamconfdir_default" - cdtag="CONF_DIR=$CONFDIR" - fi + CONFDIR="$_oscamconfdir_default" + cdtag="CONF_DIR=$CONFDIR" +elif [ ${#_oscamconfdir_custom} -gt 4 ]; +then + CONFDIR="$_oscamconfdir_custom" + cdtag="${r_l}custom CONF_DIR=$CONFDIR (via toolchain.cfg)" +elif [ ${#CUSTOM_CONFDIR} -gt 4 ]; +then + CONFDIR="$CUSTOM_CONFDIR" + cdtag="${r_l}custom CONF_DIR=$CONFDIR (via commandline)" fi printf "$y_l\n | set : ${cdtag}$w_l"