check for tput before setting formatting
This commit is contained in:
parent
5b1678c6ae
commit
acec0d6b23
@ -12,13 +12,25 @@ fi
|
|||||||
export PATH=$PATH:/usr/local/bin
|
export PATH=$PATH:/usr/local/bin
|
||||||
|
|
||||||
### text formatting presents
|
### text formatting presents
|
||||||
norm=$(tput sgr0)
|
if command -v tput > /dev/null; then
|
||||||
err=$(tput bold)$(tput setaf 1)
|
cyan=$(tput setaf 6)
|
||||||
warn=$(tput bold)$(tput setaf 3)
|
err=$(tput bold)$(tput setaf 1)
|
||||||
ok=$(tput setaf 2)
|
magenta=$(tput setaf 5)
|
||||||
yellow=$(tput setaf 3)
|
norm=$(tput sgr0)
|
||||||
cyan=$(tput setaf 6)
|
ok=$(tput setaf 2)
|
||||||
magenta=$(tput setaf 5)
|
warn=$(tput bold)$(tput setaf 3)
|
||||||
|
width=$(tput cols)
|
||||||
|
yellow=$(tput setaf 3)
|
||||||
|
else
|
||||||
|
cyan=""
|
||||||
|
err=""
|
||||||
|
magenta=""
|
||||||
|
norm=""
|
||||||
|
ok=""
|
||||||
|
warn=""
|
||||||
|
width=80
|
||||||
|
yellow=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
### trap
|
### trap
|
||||||
|
Loading…
Reference in New Issue
Block a user