Commit 64d120e1b501568e24625a3e8eebae4646b00db8
1 parent
d11596f4c9
Exists in
master
and in
2 other branches
remove the old shit beforehand
Showing 1 changed file with 17 additions and 5 deletions Side-by-side Diff
tools/install.sh
... | ... | @@ -12,12 +12,25 @@ if [ ! -n "$ZSH" ]; then |
12 | 12 | ZSH=$ZCNF/tools/oh-my-zsh |
13 | 13 | fi |
14 | 14 | |
15 | +echo "\033[0;34mCleaning...\033[0m" | |
16 | +if [ -d ~/.config ]; then | |
17 | + if [ -d ~/.config/oh-my-zsh ]; then | |
18 | + rm -rf ~/.config/oh-my-zsh | |
19 | + fi | |
20 | + if [ -d ~/.config/antigen ]; then | |
21 | + rm -rf ~/.config/antigen | |
22 | + fi | |
23 | +fi | |
24 | +if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then | |
25 | + rm ~/.zshrc | |
26 | +fi | |
27 | +if [ -f ~/.bash_aliases ] || [ -h ~/.bash_aliases ]; then | |
28 | + rm ~/.bash_aliases | |
29 | +fi | |
30 | + | |
15 | 31 | echo "\033[0;34mCloning Zsh Config...\033[0m" |
16 | 32 | hash git >/dev/null 2>&1 && env git clone --depth=1 http://git.str8.biz/mj/zsh-config.git $ZCNF || { |
17 | - echo "can't clone repo.. trying to pull" | |
18 | - hash git >/dev/null 2>&1 && env git pull --depth=1 http://git.str8.biz/mj/zsh-config.git $ZCNF || { | |
19 | - echo "can't pull, either.. giving up.." | |
20 | - } | |
33 | + echo "can't clone repo.." | |
21 | 34 | } |
22 | 35 | |
23 | 36 | echo "\033[0;34mLooking for an existing zsh config...\033[0m" |
... | ... | @@ -28,7 +41,6 @@ fi |
28 | 41 | |
29 | 42 | echo "\033[0;34mUsing the Zsh Config template file and adding it to ~/.zshrc\033[0m" |
30 | 43 | ln -s $ZCNF/templates/zshrc ~/.zshrc |
31 | -rm ~/.bash_aliases | |
32 | 44 | ln -s $ZCNF/templates/bash_aliases ~/.bash_aliases |
33 | 45 | sed -i -e "/^export ZSH=/ c\\ |
34 | 46 | export ZSH=$ZSH |