diff --git a/borghelper.sh b/borghelper.sh index 6058602..8d58b94 100755 --- a/borghelper.sh +++ b/borghelper.sh @@ -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