Mercurial > dotfiles.old
comparison hooks/pre-up @ 0:36a9b3a28861
Add all dotfiles
author | zegervdv <zegervdv@me.com> |
---|---|
date | Sun, 23 Feb 2014 17:20:32 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:36a9b3a28861 |
---|---|
1 #!/bin/sh | |
2 | |
3 if [ ! -e $HOME/.oh-my-zsh ]; then | |
4 echo "\033[0;34mCloning Oh My Zsh...\033[0m" | |
5 hash git >/dev/null && /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh || { | |
6 echo "git not installed" | |
7 exit | |
8 } | |
9 | |
10 echo "\033[0;34mLooking for an existing zsh config...\033[0m" | |
11 if [ -f ~/.zshrc ] || [ -h ~/.zshrc ] | |
12 then | |
13 echo "\033[0;33mFound ~/.zshrc.\033[0m \033[0;32mBacking up to ~/.zshrc.pre-oh-my-zsh\033[0m"; | |
14 mv ~/.zshrc ~/.zshrc.pre-oh-my-zsh; | |
15 fi | |
16 | |
17 echo "\033[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc\033[0m" | |
18 cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc | |
19 | |
20 echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m" | |
21 echo "export PATH=\$PATH:$PATH" >> ~/.zshrc | |
22 | |
23 echo "\033[0;34mTime to change your default shell to zsh!\033[0m" | |
24 chsh -s `which zsh` | |
25 | |
26 echo "\033[0;32m"' __ __ '"\033[0m" | |
27 echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m" | |
28 echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m" | |
29 echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m" | |
30 echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m" | |
31 echo "\033[0;32m"' /____/ '"\033[0m" | |
32 | |
33 echo "\n\n \033[0;32m....is now installed.\033[0m" | |
34 /usr/bin/env zsh | |
35 source ~/.zshrc | |
36 sudo chsh -s `which zsh` `whoami` | |
37 | |
38 fi |