chore: portable stdout coloring in scripts

BSD's (macos) version of echo does not support -e flag
This commit is contained in:
Ivan Dyachkov 2022-10-06 11:26:56 +02:00
parent 10f1052be5
commit 280668ce13
2 changed files with 4 additions and 5 deletions

View File

@ -40,10 +40,10 @@ EOF
} }
logerr() { logerr() {
echo -e "\e[31mERROR: $1\e[39m" echo "$(tput setaf 1)ERROR: $1$(tput sgr0)"
} }
logmsg() { logmsg() {
echo -e "\e[33mINFO: $1\e[39m" echo "INFO: $1"
} }
REL_BRANCH_CE="${REL_BRANCH_CE:-release-v43}" REL_BRANCH_CE="${REL_BRANCH_CE:-release-v43}"

View File

@ -45,11 +45,10 @@ EOF
} }
logerr() { logerr() {
echo -e "\e[31mERROR: $1\e[39m" echo "$(tput setaf 1)ERROR: $1$(tput sgr0)"
} }
logwarn() { logwarn() {
echo -e "\e[33mINFO: $1\e[39m" echo "$(tput setaf 3)WARNING: $1$(tput sgr0)"
} }
logmsg() { logmsg() {