summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRenan Cakirerk <renan@cakirerk.org>2012-06-23 14:53:40 +0300
committerRenan Cakirerk <renan@cakirerk.org>2012-06-23 14:58:04 +0300
commita39c9ffe5b7236b6e4dc78efa80b478cc411af7f (patch)
tree42166affce4f9ec85dac536ba1ccfeee2df9c23f /tools
parent3ac3141cd610de995b2435011ac895ad15b89e2e (diff)
downloadzsh-a39c9ffe5b7236b6e4dc78efa80b478cc411af7f.tar.gz
zsh-a39c9ffe5b7236b6e4dc78efa80b478cc411af7f.tar.bz2
zsh-a39c9ffe5b7236b6e4dc78efa80b478cc411af7f.zip
Fix finding git issue. http://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script
Diffstat (limited to 'tools')
-rwxr-xr-xtools/install.sh7
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/install.sh b/tools/install.sh
index 8ca427d2c..b080be3a1 100755
--- a/tools/install.sh
+++ b/tools/install.sh
@@ -5,13 +5,10 @@ then
fi
echo "\033[0;34mCloning Oh My Zsh...\033[0m"
-which git > /dev/null
-if [[ $? -eq 0 ]]; then
- /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
-else
+hash git >/dev/null && /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh || {
echo "git not installed"
exit
-fi
+}
echo "\033[0;34mLooking for an existing zsh config...\033[0m"
if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]