d4a9467f89115c1e60b51d8c068ec4e5e1c5b195

Author
dongweiming <ciici123@hotmail.com>
Committer
dongweiming <ciici123@hotmail.com>
Date

Message

Modify determine the oh-my-zsh installed in non-default path of the installed

Diff

 1diff --git a/tools/install.sh b/tools/install.sh
 2index a2bd5665a8c1338473f743c76c0152bd29e420da..5af038fd991129aed96046616dca448e15c91d58 100755
 3--- a/tools/install.sh
 4+++ b/tools/install.sh
 5@@ -1,6 +1,11 @@
 6-if [ -d ~/.oh-my-zsh ]
 7+ZSH=`/usr/bin/env|grep 'ZSH='|cut -d '=' -f 2`
 8+if [ -d "$ZSH" ]
 9 then
10-  echo "\033[0;33mYou already have Oh My Zsh installed.\033[0m You'll need to remove ~/.oh-my-zsh if you want to install"
11+  echo "\033[0;33mYou already have Oh My Zsh installed.\033[0m You'll need to remove $ZSH if you want to install"
12+  exit
13+elif [ -d ~/.oh-my-zsh ]
14+then
15+  echo "\033[0;33mYou already have One Oh My Zsh Directory.\033[0m You'll need to remove  ~/.oh-my-zsh if you want to clone"
16   exit
17 fi
18