mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
Allow (re)installing from local repo
If a local directory exists, perhaps a forked copy instead of the robbyrussell master, this allows the installer script to use it and continue the install process instead of exiting early. Changes the installer to continue even if the $ZSH directory is already installed.
This commit is contained in:
parent
27d1f410ab
commit
77f0110d5f
1 changed files with 6 additions and 9 deletions
|
|
@ -5,18 +5,15 @@ then
|
|||
ZSH=~/.oh-my-zsh
|
||||
fi
|
||||
|
||||
if [ -d $ZSH ]
|
||||
if [ ! -d $ZSH ]
|
||||
then
|
||||
echo "\033[0;33mYou already have Oh My Zsh installed.\033[0m You'll need to remove $ZSH if you want to install"
|
||||
exit
|
||||
echo "\033[0;34mCloning Oh My Zsh...\033[0m"
|
||||
hash git >/dev/null && /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git $ZSH || {
|
||||
echo "git not installed"
|
||||
exit
|
||||
}
|
||||
fi
|
||||
|
||||
echo "\033[0;34mCloning Oh My Zsh...\033[0m"
|
||||
hash git >/dev/null && /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git $ZSH || {
|
||||
echo "git not installed"
|
||||
exit
|
||||
}
|
||||
|
||||
echo "\033[0;34mLooking for an existing zsh config...\033[0m"
|
||||
if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]
|
||||
then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue