ccaaa992c733e4e3a4904d78ff84748c56236860

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #4241 from heartinpiece/master

Check if Zsh is installed prior to installing Oh My Zsh

Diff

 1diff --git a/tools/install.sh b/tools/install.sh
 2index 17f4076c1d542e08b35fa04c85023c8961a16d5d..1586cdee567d12e0d501566e027f51c7b797dcc5 100755
 3--- a/tools/install.sh
 4+++ b/tools/install.sh
 5@@ -1,5 +1,12 @@
 6 set -e
 7 
 8+CHECK_ZSH_INSTALLED=$(grep /zsh$ /etc/shells | wc -l)
 9+if [ ! $CHECK_ZSH_INSTALLED -ge 1 ]; then
10+  echo "\033[0;33m Zsh is not installed!\033[0m Please install zsh first!"
11+  exit
12+fi
13+unset CHECK_ZSH_INSTALLED
14+
15 if [ ! -n "$ZSH" ]; then
16   ZSH=~/.oh-my-zsh
17 fi