installer: don't bail on errors in color setup

This is a hack to keep the installer working on systems without tput/terminfo.
This commit is contained in:
Andrew Janke 2015-09-28 08:35:25 -04:00
Родитель b05ef1034f
Коммит f94fee5a7f
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -1,5 +1,3 @@
set -e
# Use colors, but only if connected to a terminal, and that terminal # Use colors, but only if connected to a terminal, and that terminal
# supports them. # supports them.
tput=$(which tput) tput=$(which tput)
@ -21,6 +19,11 @@ else
BOLD="" BOLD=""
NORMAL="" NORMAL=""
fi 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) CHECK_ZSH_INSTALLED=$(grep /zsh$ /etc/shells | wc -l)
if [ ! $CHECK_ZSH_INSTALLED -ge 1 ]; then if [ ! $CHECK_ZSH_INSTALLED -ge 1 ]; then
printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n" printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n"