8c73eb4f446650adf8f82f72e65943a8834847f3

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Merge pull request #4419 from apjanke/installer-termcap-hack

installer: ignore errors in color setup, for FreeBSD portability

Diff

 1diff --git a/tools/install.sh b/tools/install.sh
 2index 5633320a85e23fa1004133f9ecdf08ddcea4a82b..67d341c7c23ca592ebf1195e50f7e7c53b57a566 100755
 3--- a/tools/install.sh
 4+++ b/tools/install.sh
 5@@ -1,5 +1,3 @@
 6-set -e
 7-
 8 # Use colors, but only if connected to a terminal, and that terminal
 9 # supports them.
10 tput=$(which tput)
11@@ -21,6 +19,11 @@ else
12   BOLD=""
13   NORMAL=""
14 fi
15+
16+# Only enable exit-on-error after the non-critical colorization stuff,
17+# which may fail on systems lacking tput or terminfo
18+set -e
19+
20 CHECK_ZSH_INSTALLED=$(grep /zsh$ /etc/shells | wc -l)
21 if [ ! $CHECK_ZSH_INSTALLED -ge 1 ]; then
22   printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n"