Improve interactive dialogs

This commit is contained in:
Bob Mottram 2016-10-17 10:20:55 +01:00
parent f0d725c627
commit b6a93be4c1
1 changed files with 6 additions and 5 deletions

View File

@ -163,8 +163,9 @@ function interactive_site_details {
# save the results in the config file # save the results in the config file
write_config_param "${site_name_upper}_DOMAIN_NAME" "$SITE_DOMAIN_NAME" write_config_param "${site_name_upper}_DOMAIN_NAME" "$SITE_DOMAIN_NAME"
if [ $SITE_CODE ]; then site_code_str="$SITE_CODE"
write_config_param "${site_name_upper}_CODE" "$SITE_CODE" if [ ${#site_code_str} -gt 1 ]; then
write_config_param "${site_name_upper}_CODE" "${SITE_CODE}"
fi fi
} }
@ -233,11 +234,11 @@ function interactive_site_details_with_title {
done done
# save the results in the config file # save the results in the config file
write_config_param "$2" "${!SITE_TITLE}" write_config_param "$2" "${SITE_TITLE}"
write_config_param "$3" "${!SITE_DOMAIN_NAME}" write_config_param "$3" "${SITE_DOMAIN_NAME}"
site_code_str="$SITE_CODE" site_code_str="$SITE_CODE"
if [ ${#site_code_str} -gt 1 ]; then if [ ${#site_code_str} -gt 1 ]; then
write_config_param "$4" "${!SITE_CODE}" write_config_param "$4" "${SITE_CODE}"
fi fi
} }