From b6a93be4c135b94cd4b8f674ce9ed5fabafc4450 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 17 Oct 2016 10:20:55 +0100 Subject: [PATCH] Improve interactive dialogs --- src/freedombone-utils-interactive | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/freedombone-utils-interactive b/src/freedombone-utils-interactive index b3fd071a..3255e212 100755 --- a/src/freedombone-utils-interactive +++ b/src/freedombone-utils-interactive @@ -163,8 +163,9 @@ function interactive_site_details { # save the results in the config file write_config_param "${site_name_upper}_DOMAIN_NAME" "$SITE_DOMAIN_NAME" - if [ $SITE_CODE ]; then - write_config_param "${site_name_upper}_CODE" "$SITE_CODE" + site_code_str="$SITE_CODE" + if [ ${#site_code_str} -gt 1 ]; then + write_config_param "${site_name_upper}_CODE" "${SITE_CODE}" fi } @@ -233,11 +234,11 @@ function interactive_site_details_with_title { done # save the results in the config file - write_config_param "$2" "${!SITE_TITLE}" - write_config_param "$3" "${!SITE_DOMAIN_NAME}" + write_config_param "$2" "${SITE_TITLE}" + write_config_param "$3" "${SITE_DOMAIN_NAME}" site_code_str="$SITE_CODE" if [ ${#site_code_str} -gt 1 ]; then - write_config_param "$4" "${!SITE_CODE}" + write_config_param "$4" "${SITE_CODE}" fi }