summaryrefslogtreecommitdiff
path: root/tools/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/install.sh')
-rwxr-xr-xtools/install.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/install.sh b/tools/install.sh
index 5633320a8..542bf97c2 100755
--- a/tools/install.sh
+++ b/tools/install.sh
@@ -2,9 +2,8 @@ set -e
# Use colors, but only if connected to a terminal, and that terminal
# supports them.
-tput=$(which tput)
-if [ -n "$tput" ]; then
- 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)"