More compatible way of checking if zsh is installed

This commit is contained in:
Void 2017-11-06 19:25:13 -06:00
parent 9edb3fceba
commit 2832521585

View File

@ -24,12 +24,10 @@ main() {
# 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
if [ -z `which zsh` ]; then
printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n"
exit
fi
unset CHECK_ZSH_INSTALLED
if [ ! -n "$ZSH" ]; then
ZSH=~/.oh-my-zsh