diff options
author | Marc Cornellà <marc.cornella@live.com> | 2015-10-20 08:30:14 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2015-10-20 08:30:14 +0200 |
commit | 8c73eb4f446650adf8f82f72e65943a8834847f3 (patch) | |
tree | e12051cc55b19b7aba12ce98beea102f581fa53b | |
parent | 45f0a2800b1c58dd054431507f6934f6451b8078 (diff) | |
parent | f94fee5a7fd1a4704d65d52a2f1c522a3831ca1a (diff) | |
download | zsh-8c73eb4f446650adf8f82f72e65943a8834847f3.tar.gz zsh-8c73eb4f446650adf8f82f72e65943a8834847f3.tar.bz2 zsh-8c73eb4f446650adf8f82f72e65943a8834847f3.zip |
Merge pull request #4419 from apjanke/installer-termcap-hack
installer: ignore errors in color setup, for FreeBSD portability
-rwxr-xr-x | tools/install.sh | 7 |
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" |