From 283252158563af52f87fd52b15aaaffe029191e5 Mon Sep 17 00:00:00 2001 From: Void Date: Mon, 6 Nov 2017 19:25:13 -0600 Subject: [PATCH] More compatible way of checking if zsh is installed --- tools/install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index 187c828f..3bafbe22 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -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