colors will not print on unsupported terminals
This commit is contained in:
parent
026156e1f5
commit
472400d7e1
1 changed files with 9 additions and 7 deletions
16
cbuild.sh
16
cbuild.sh
|
@ -33,13 +33,15 @@ if [ -n "${PKG_CONFIG_LIBS}" ]; then
|
||||||
LDLIBS="${CFLAGS} $(pkg-config --libs "${PKG_CONFIG_LIBS}")"
|
LDLIBS="${CFLAGS} $(pkg-config --libs "${PKG_CONFIG_LIBS}")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
clear_formatting="\033[0m"
|
if [ "$(tput colors)" != "-1" ]; then
|
||||||
bold="\033[1m"
|
clear_formatting="\033[0m"
|
||||||
info_color="\033[34m" # default: "\033[34m" - blue
|
bold="\033[1m"
|
||||||
err_color="\033[31m" # default: "\033[31m" - red
|
info_color="\033[34m" # default: "\033[34m" - blue
|
||||||
build_progress_color="\033[35m" # default: "\033[35m" - magenta
|
err_color="\033[31m" # default: "\033[31m" - red
|
||||||
build_info_color="\033[32m" # default: "\033[32m" - green
|
build_progress_color="\033[35m" # default: "\033[35m" - magenta
|
||||||
link_info_color="\033[36m" # default: "\033[36m" - cyan
|
build_info_color="\033[32m" # default: "\033[32m" - green
|
||||||
|
link_info_color="\033[36m" # default: "\033[36m" - cyan
|
||||||
|
fi
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
less <<EOF
|
less <<EOF
|
||||||
|
|
Loading…
Reference in a new issue