diff options
Diffstat (limited to 'include/helper_configure')
-rw-r--r-- | include/helper_configure | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/helper_configure b/include/helper_configure index 02c750f4..042f1a1d 100644 --- a/include/helper_configure +++ b/include/helper_configure @@ -80,19 +80,23 @@ #read VALUE else Debug "Setting '${SETTING}' should be configured with value '${VALUE}'" + FIND=$(grep "^${SETTING}" ${CUSTOM_PROFILE}) + if [ "${FIND}" = "" ]; then + ${ECHOCMD} "Configuring setting '${CYAN}${SETTING}${NORMAL}'" + echo "${SETTING}=${VALUE}" >> ${CUSTOM_PROFILE} + else + ${ECHOCMD} "${RED}Error${NORMAL}: Setting '${CYAN}${SETTING}${NORMAL}' was already configured:${NORMAL} ${WHITE}${FIND}${NORMAL}" + fi fi # Now check if value is in line with expected type (boolean, integer, string) # =To be implemented= done ${ECHOCMD} "" - ${ECHOCMD} "${YELLOW}Note${NORMAL}: ${WHITE}Automatic configuration not fully implemented yet.${NORMAL}" ${ECHOCMD} "" ExitClean fi - ExitClean - # The End |