Use tput for colors.

Color codes may vary from one terminal to another.  Use tput to always get the
right codes for the terminal in use.
This commit is contained in:
Peter Ajamian 2021-05-07 07:02:40 +12:00
parent 5e22c910a5
commit cb92952867
1 changed files with 3 additions and 3 deletions

View File

@ -7,9 +7,9 @@
(
# Pass everything to a subshell so the output can be piped to /var/log/centos2rocky.log
errcolor="\033[3;35m"
nocolor="\033[0m"
blue="\033[1;35m"
errcolor=$(tput setaf 1)
nocolor=$(tput op)
blue=$(tput setaf 4)
set -e
unset CDPATH