884a8795623087d4812511de21dfb9329fa29e56
- Author
- Frederic Crozat <fred@crozat.net>
- Committer
- Frederic Crozat <fred@crozat.net>
- Date
Message
Do not fail if tput is not available
Fixes issue #4376
Diff
1diff --git a/tools/install.sh b/tools/install.sh
2index 4b1a6ba7e1651180159aaf73587f48d01a54b1e9..30d66d4b53b37a753dd6ea3f653c88e3553fb695 100755
3--- a/tools/install.sh
4+++ b/tools/install.sh
5@@ -2,7 +2,10 @@ set -e
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)"