From cb92952867eb7be4d5e2dffd4fffd968fd41b99f Mon Sep 17 00:00:00 2001 From: Peter Ajamian Date: Fri, 7 May 2021 07:02:40 +1200 Subject: [PATCH] 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. --- centos2rocky.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/centos2rocky.sh b/centos2rocky.sh index 396512e..68f6bdf 100755 --- a/centos2rocky.sh +++ b/centos2rocky.sh @@ -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