Added tBoldBox and color constants.

This commit is contained in:
Scott Duensing 2019-06-26 20:21:32 -05:00
parent 652877382d
commit c3050750ea

View file

@ -24,6 +24,39 @@
# #
#
# Color constants for tBoldBox.
#
tRED=1
tGREEN=2
tYELLOW=3
tBLUE=4
tPURPLE=5
tCYAN=6
#
# Draws bold white text inside a colored box.
#
# Parameters:
#
# COLOR - Towel color constant for box background color.
# TEXT - Text to display.
#
function tBoldBox() {
local __COLOR=$1
local __TEXT=$2
local __LEN=$((${#__TEXT}+6))
local __SPACES=$(printf "%${__LEN}s")
__COLOR=${!__COLOR}
echo -e "\e[1m\e[4${__COLOR}m${__SPACES}\e[0m"
echo -e "\e[1m\e[4${__COLOR}m ${__TEXT} \e[0m"
echo -e "\e[1m\e[4${__COLOR}m${__SPACES}\e[0m"
}
# #
# Checks to see if listed packages have been installed. # Checks to see if listed packages have been installed.
# Currently DEB packages only. # Currently DEB packages only.