From 486259f99ca5542a4b0a11959513d2ef050650ec Mon Sep 17 00:00:00 2001 From: i-c-u-p <96894903+i-c-u-p@users.noreply.github.com> Date: Tue, 26 Apr 2022 10:49:09 +0000 Subject: [PATCH] move color/bold effects on format warning to vars --- scripts/startup.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/startup.sh b/scripts/startup.sh index 74e547f..24f848d 100755 --- a/scripts/startup.sh +++ b/scripts/startup.sh @@ -6,6 +6,12 @@ # @stdout Output routed to startup.log # @stderror Output routed to startup.log +# Colors/formatting for echo: { +RED='\e[31m' +BOLD=$(tput bold) +RESET='\e[0m' # Reset text to default appearance +# } + # @setting-header General Settings # @setting CONFIG_FILE string[$CONFIGS_DIR/setup.conf] Location of setup.conf to be used by set_option and all subsequent scripts. CONFIG_FILE=$CONFIGS_DIR/setup.conf @@ -234,11 +240,11 @@ esac diskpart () { echo -e " ------------------------------------------------------------------------ - \e[1;31mTHIS WILL FORMAT AND DELETE ALL DATA ON THE DISK!\e[0m + ${RED}${BOLD}THIS WILL FORMAT AND DELETE ALL DATA ON THE DISK!${RESET} Please make sure you know what you are doing because after formating your disk there is no way to get data back ------------------------------------------------------------------------ -" # \e[1;31m makes text bold and red, \e[0m reverts it to normal +" PS3=' Select the disk to install on: '