move color/bold effects on format warning to vars

This commit is contained in:
i-c-u-p 2022-04-26 10:49:09 +00:00
parent 798e3b2a09
commit 486259f99c
No known key found for this signature in database
GPG Key ID: ABB80C12170FC0D1
1 changed files with 8 additions and 2 deletions

View File

@ -6,6 +6,12 @@
# @stdout Output routed to startup.log # @stdout Output routed to startup.log
# @stderror 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-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. # @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 CONFIG_FILE=$CONFIGS_DIR/setup.conf
@ -234,11 +240,11 @@ esac
diskpart () { diskpart () {
echo -e " 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 Please make sure you know what you are doing because
after formating your disk there is no way to get data back 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=' PS3='
Select the disk to install on: ' Select the disk to install on: '