diff --git a/pilerBackup/pilerbackup.sh b/pilerBackup/pilerbackup.sh index ef965a4..724dd9c 100755 --- a/pilerBackup/pilerbackup.sh +++ b/pilerBackup/pilerbackup.sh @@ -12,13 +12,25 @@ fi export PATH=$PATH:/usr/local/bin ### text formatting presents -norm=$(tput sgr0) -err=$(tput bold)$(tput setaf 1) -warn=$(tput bold)$(tput setaf 3) -ok=$(tput setaf 2) -yellow=$(tput setaf 3) -cyan=$(tput setaf 6) -magenta=$(tput setaf 5) +if command -v tput > /dev/null; then + cyan=$(tput setaf 6) + err=$(tput bold)$(tput setaf 1) + magenta=$(tput setaf 5) + norm=$(tput sgr0) + ok=$(tput setaf 2) + 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