From d89f829fb83de19b4e84510d81adb76bd9b70d50 Mon Sep 17 00:00:00 2001 From: Yurizal Susanto Date: Sat, 28 Jan 2017 08:07:07 +0700 Subject: [PATCH] Change how oh-my-zsh check if zsh is installed In stateless OS like Solus or Clear Linux, they didn't have /etc/shells. --- tools/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/install.sh b/tools/install.sh index 3f4de8681..871f9dd11 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -24,7 +24,7 @@ main() { # which may fail on systems lacking tput or terminfo set -e - CHECK_ZSH_INSTALLED=$(grep /zsh$ /etc/shells | wc -l) + CHECK_ZSH_INSTALLED=$(grep -E ^"${USER}:" /etc/passwd|cut -d : -f 7) if [ ! $CHECK_ZSH_INSTALLED -ge 1 ]; then printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n" exit