Better display when multiple items are to be configured

This commit is contained in:
Michael Boelen 2016-05-25 13:29:01 +02:00
parent c42a1d4083
commit 6f1be4c82a
1 changed files with 4 additions and 4 deletions

View File

@ -76,6 +76,7 @@
SETTING=$(echo ${I} | awk -F= '{print $1}') SETTING=$(echo ${I} | awk -F= '{print $1}')
VALUE=$(echo ${I} | awk -F= '{print $2}') VALUE=$(echo ${I} | awk -F= '{print $2}')
if [ "${VALUE}" = "" ]; then if [ "${VALUE}" = "" ]; then
${ECHOCMD} "Profile: ${CUSTOM_PROFILE}"
Debug "Did not find a value configured on the command line for setting ${SETTING}" Debug "Did not find a value configured on the command line for setting ${SETTING}"
#read VALUE #read VALUE
else else
@ -84,12 +85,11 @@
if [ "${FIND}" = "" ]; then if [ "${FIND}" = "" ]; then
${ECHOCMD} "Configuring setting '${CYAN}${SETTING}${NORMAL}'" ${ECHOCMD} "Configuring setting '${CYAN}${SETTING}${NORMAL}'"
echo "${SETTING}=${VALUE}" >> ${CUSTOM_PROFILE} echo "${SETTING}=${VALUE}" >> ${CUSTOM_PROFILE}
if [ $? -eq 0 ]; then ${ECHOCMD} "${GREEN}Setting changed${NORMAL}"; fi
else else
${ECHOCMD} "${YELLOW}Notice${NORMAL}: Setting '${CYAN}${SETTING}${NORMAL}' was already configured (not changed)${NORMAL}"
${ECHOCMD} " Current value: ${WHITE}${FIND}${NORMAL}"
${ECHOCMD} "" ${ECHOCMD} ""
${ECHOCMD} "${RED}Error${NORMAL}: Setting '${CYAN}${SETTING}${NORMAL}' was already configured${NORMAL}"
${ECHOCMD} ""
${ECHOCMD} "Profile: ${CUSTOM_PROFILE}"
${ECHOCMD} "Current value: ${WHITE}${FIND}${NORMAL}"
fi fi
fi fi
# Now check if value is in line with expected type (boolean, integer, string) # Now check if value is in line with expected type (boolean, integer, string)