Fallback to colorless mode when tput is not installed

This commit is contained in:
arcadius3d committed 2018-07-18 20:19:43 -03:00
1 parent dfbf80498d
commit 68f11585ac
14 files changed
+171 -143

No files matched your search

+12 -10
View File
@@ -30,16 +30,18 @@ fi
## DEFINE COLORS
# probably don't change these
bold="$(tput md)"
black="$(tput AF 0)"
red="$(tput AF 1)"
green="$(tput AF 2)"
yellow="$(tput AF 3)"
blue="$(tput AF 4)"
magenta="$(tput AF 5)"
cyan="$(tput AF 6)"
white="$(tput AF 7)"
reset="$(tput me)"
if [ -x "$(command -v tput)" ]; then
bold="$(tput md)"
black="$(tput AF 0)"
red="$(tput AF 1)"
green="$(tput AF 2)"
yellow="$(tput AF 3)"
blue="$(tput AF 4)"
magenta="$(tput AF 5)"
cyan="$(tput AF 6)"
white="$(tput AF 7)"
reset="$(tput me)"
fi
# you can change these
lc="${reset}${bold}${red}" # labels