7d9ae4cdb1af014422df83312ee200c9b7923348
- Author
- Robby Russell <robby@planetargon.com>
- Committer
- Robby Russell <robby@planetargon.com>
- Date
Message
Merge pull request #1055 from daniellockard/patch-1
Added an if-statement to see if git is installed
Diff
1diff --git a/tools/install.sh b/tools/install.sh
2index aedb706dae1c96a71b8ec31fb2f038cc3e7a9fa3..8ca427d2caf3620d141b043ab333a005aeaf47ea 100755
3--- a/tools/install.sh
4+++ b/tools/install.sh
5@@ -5,7 +5,13 @@ then
6 fi
7
8 echo "\033[0;34mCloning Oh My Zsh...\033[0m"
9-/usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
10+which git > /dev/null
11+if [[ $? -eq 0 ]]; then
12+ /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
13+else
14+ echo "git not installed"
15+ exit
16+fi
17
18 echo "\033[0;34mLooking for an existing zsh config...\033[0m"
19 if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]