diff options
Diffstat (limited to 'tools/upgrade.sh')
-rw-r--r-- | tools/upgrade.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/upgrade.sh b/tools/upgrade.sh index 65af6e368..fe8fbadca 100644 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -1,7 +1,9 @@ # Use colors, but only if connected to a terminal, and that terminal # supports them. -ncolors=$(tput colors) +if which tput >/dev/null 2>&1; then + ncolors=$(tput colors) +fi if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then RED="$(tput setaf 1)" GREEN="$(tput setaf 2)" |