f94fee5a7fd1a4704d65d52a2f1c522a3831ca1a

Author
Andrew Janke <andrew@apjanke.net>
Committer
Andrew Janke <andrew@apjanke.net>
Date

Message

installer: don't bail on errors in color setup

This is a hack to keep the installer working on systems without tput/terminfo.

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"