95296bb0c5fade33c6cda7ccc7139a35c2641b3a
- Author
- Frederic Crozat <fred@crozat.net>
- Committer
- Frederic Crozat <fred@crozat.net>
- Date
Message
also handle missing tput in upgrade script.
Diff
1diff --git a/tools/upgrade.sh b/tools/upgrade.sh
2index 65af6e36843d805621cd71d60275c2ff84692780..6e9696202b3e97350142987bd3fa0f78194ccb4a 100644
3--- a/tools/upgrade.sh
4+++ b/tools/upgrade.sh
5@@ -1,7 +1,10 @@
6
7 # Use colors, but only if connected to a terminal, and that terminal
8 # supports them.
9-ncolors=$(tput colors)
10+tput=$(which tput)
11+if [ -n "$tput" ]; then
12+ ncolors=$(tput colors)
13+fi
14 if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
15 RED="$(tput setaf 1)"
16 GREEN="$(tput setaf 2)"