don't use tput if it's not installed

This commit is contained in:
Asif Bacchus 2020-03-26 03:25:54 -06:00
parent 02a27f55a1
commit ba58997b9f
1 changed files with 9 additions and 3 deletions

View File

@ -25,9 +25,15 @@ trapExit () {
### text formatting presets
err=$(tput bold)$(tput setaf 1)
norm=$(tput sgr0)
width=$(tput cols)
if command -v tput > /dev/null; then
err=$(tput bold)$(tput setaf 1)
norm=$(tput sgr0)
width=$(tput cols)
else
err="[ERROR] "
norm=""
width=80
fi
### pre-requisites