[v9_11] copy the color-coded test functions to conf.sh.win32

This commit is contained in:
Evan Hunt 2017-10-04 09:28:37 -07:00
parent 834b5e1e7e
commit e7d68fc4b6

View file

@ -142,6 +142,43 @@ NZD=@NZD_TOOLS@
. ${TOP}/version
#
# Set up color-coded test output
#
if test -t 1 && type tput > /dev/null; then
COLOR_FAIL=`tput setaf 1` # red
COLOR_WARN=`tput setaf 3` # yellow
COLOR_PASS=`tput setaf 2` # green
COLOR_INFO=`tput bold` # bold
COLOR_NONE=`tput sgr0`
else
# set to empty strings so printf succeeds
COLOR_FAIL=''
COLOR_WARN=''
COLOR_PASS=''
COLOR_INFO=''
COLOR_NONE=''
fi
echofail () {
printf "${COLOR_FAIL}%s${COLOR_NONE}\n" "$*"
}
echowarn () {
printf "${COLOR_WARN}%s${COLOR_NONE}\n" "$*"
}
echopass () {
printf "${COLOR_PASS}%s${COLOR_NONE}\n" "$*"
}
echoinfo () {
printf "${COLOR_INFO}%s${COLOR_NONE}\n" "$*"
}
#
# Export command paths
#
export ARPANAME
export BIGKEY
export CHECKZONE