added text formatting sequences

knocking out the tput dependency
This commit is contained in:
kevinnls
2021-03-16 19:06:36 +05:30
parent 906d847823
commit 289073c584
2 changed files with 14 additions and 0 deletions

View File

@@ -18,6 +18,13 @@ debug(){ ### function to call when $DEBUG is set
set -xv set -xv
} }
# text formatting escape sequences
txt_bold='\e[1m'
txt_red='\e[31m'
txt_green='\e[32m'
txt_yellow='\e[33m'
txt_0='\e[0m'
############################################################################### ###############################################################################
# f() FOR PRINTING PROMPTS # f() FOR PRINTING PROMPTS
############################# #############################

View File

@@ -36,6 +36,13 @@ is_command(){ ### function to check if a command exists
{ command -v $1;} >/dev/null && return 0 || return 1 { command -v $1;} >/dev/null && return 0 || return 1
} }
# text formatting escape sequences
txt_bold='\e[1m'
txt_red='\e[31m'
txt_green='\e[32m'
txt_yellow='\e[33m'
txt_0='\e[0m'
err_no_downloader(){ err_no_downloader(){
cat <<- EOM cat <<- EOM
$(tput setaf 1; tput bold)ERR: missing dependencies$(tput sgr0) $(tput setaf 1; tput bold)ERR: missing dependencies$(tput sgr0)