summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAndrew Janke <andrew@apjanke.net>2015-09-28 08:35:25 -0400
committerAndrew Janke <andrew@apjanke.net>2015-09-28 08:35:25 -0400
commitf94fee5a7fd1a4704d65d52a2f1c522a3831ca1a (patch)
tree84cc710d4dc38a9233ddc017cd53aee686fe6521 /tools
parentb05ef1034fffd7b0c29f1558a8a357ccce7ae74b (diff)
downloadzsh-f94fee5a7fd1a4704d65d52a2f1c522a3831ca1a.tar.gz
zsh-f94fee5a7fd1a4704d65d52a2f1c522a3831ca1a.tar.bz2
zsh-f94fee5a7fd1a4704d65d52a2f1c522a3831ca1a.zip
installer: don't bail on errors in color setup
This is a hack to keep the installer working on systems without tput/terminfo.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/install.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/install.sh b/tools/install.sh
index 5633320a8..67d341c7c 100755
--- a/tools/install.sh
+++ b/tools/install.sh
@@ -1,5 +1,3 @@
-set -e
-
# Use colors, but only if connected to a terminal, and that terminal
# supports them.
tput=$(which tput)
@@ -21,6 +19,11 @@ else
BOLD=""
NORMAL=""
fi
+
+# Only enable exit-on-error after the non-critical colorization stuff,
+# which may fail on systems lacking tput or terminfo
+set -e
+
CHECK_ZSH_INSTALLED=$(grep /zsh$ /etc/shells | wc -l)
if [ ! $CHECK_ZSH_INSTALLED -ge 1 ]; then
printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n"