1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,24 @@ |
0 |
+if [ -d ~/.oh-my-zsh ] |
|
1 |
+then |
|
2 |
+ echo "You already have Oh My Zsh installed. You'll need to remove ~/.oh-my-zsh if you want to install" |
|
3 |
+ exit |
|
4 |
+else |
|
5 |
+ echo "Cloning Oh My Zsh..." |
|
6 |
+ /usr/bin/env git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh |
|
7 |
+fi |
|
8 |
+ |
|
9 |
+echo "Looking for an existing zsh config..." |
|
10 |
+if [ -f ~/.zshrc ] |
|
11 |
+then |
|
12 |
+ echo "Found ~/.zshrc. Backing up to ~/.zshrc.pre-oh-my-zsh"; |
|
13 |
+ cp ~/.zshrc ~/.zshrc.pre-oh-my-zsh; |
|
14 |
+ rm ~/.zshrc; |
|
15 |
+fi |
|
16 |
+ |
|
17 |
+echo "Symlinking .zshrc to ~/.oh-my-zsh/" |
|
18 |
+ln -s ~/.oh-my-zsh/zshrc ~/.zshrc |
|
19 |
+ |
|
20 |
+echo "Time to change your default shell to zsh!" |
|
21 |
+chsh -s /bin/zsh |
|
22 |
+ |
|
23 |
+echo "Hooray! Oh My Zsh has been installed." |