diff options
author | Frederic Crozat <fred@crozat.net> | 2015-09-21 19:55:28 +0200 |
---|---|---|
committer | Frederic Crozat <fred@crozat.net> | 2015-09-21 20:02:57 +0200 |
commit | 884a8795623087d4812511de21dfb9329fa29e56 (patch) | |
tree | 3b24fffb76343645a7ee645c5b42d2e9baa2fe6a /tools | |
parent | 918d26e7dbcb907e673df24242c9688cd89019b9 (diff) | |
download | zsh-884a8795623087d4812511de21dfb9329fa29e56.tar.gz zsh-884a8795623087d4812511de21dfb9329fa29e56.tar.bz2 zsh-884a8795623087d4812511de21dfb9329fa29e56.zip |
Do not fail if tput is not available
Fixes issue #4376
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/install.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/install.sh b/tools/install.sh index 4b1a6ba7e..30d66d4b5 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -2,7 +2,10 @@ set -e # Use colors, but only if connected to a terminal, and that terminal # supports them. -ncolors=$(tput colors) +tput=$(which tput) +if [ -n "$tput" ]; then + ncolors=$($tput colors) +fi if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then RED="$(tput setaf 1)" GREEN="$(tput setaf 2)" |