Commit d0872834e0b740fe1eefd32e30b28eefe24a8fd6

Authored by mj
1 parent ef0df3e18e
Exists in master and in 2 other branches 02-merge, dev

ionstall.sh

Showing 1 changed file with 1 additions and 1 deletions Inline Diff

1 #@IgnoreInspection AddShebang 1 #@IgnoreInspection AddShebang
2 # ** Initiate with: ** 2 # ** Initiate with: **
3 # cd && wget http://git.str8.biz/mj/zsh-config/raw/master/tools/install.sh -O -| sh 3 # cd && wget http://git.str8.biz/mj/zsh-config/raw/master/tools/install.sh -O -| sh
4 # ----------------------------------------------------------------------------------- 4 # -----------------------------------------------------------------------------------
5 5
6 set -e 6 set -e
7 7
8 if [ "$SHELL" != "$(which zsh)" ]; then 8 if [ "$SHELL" != "$(which zsh)" ]; then
9 echo "$(which zsh)" 9 echo "$(which zsh)"
10 sudo echo "enter pass...." 10 sudo echo "enter pass...."
11 11
12 echo "ok" 12 echo "ok"
13 13
14 sudo apt-get -yq install curl dialog nano python-setuptools zsh 14 sudo apt-get -yq install curl dialog nano python-setuptools zsh
15 15
16 sudo easy_install pip 16 sudo easy_install pip
17 sudo pip install virtualenvwrapper 17 sudo pip install virtualenvwrapper
18 fi 18 fi
19 19
20 if [ 1 == 1 ]; then 20 if [ 1 == 1 ]; then
21 mkvirtualenv cb-meteor 21 mkvirtualenv cb-meteor
22 pip install nodeenv 22 pip install nodeenv
23 nodeenv -p 23 nodeenv -p
24 curl https://install.meteor.com/ | sh 24 # curl https://install.meteor.com/ | sh
25 fi 25 fi
26 26
27 if [ ! -n "$ZCNF" ]; then 27 if [ ! -n "$ZCNF" ]; then
28 ZCNF=~/.config/zsh-config 28 ZCNF=~/.config/zsh-config
29 fi 29 fi
30 30
31 if [ ! -n "$ZSH" ]; then 31 if [ ! -n "$ZSH" ]; then
32 ZSH=$ZCNF/tools/oh-my-zsh 32 ZSH=$ZCNF/tools/oh-my-zsh
33 fi 33 fi
34 34
35 echo "\033[0;34mCleaning...\033[0m" 35 echo "\033[0;34mCleaning...\033[0m"
36 if [ -d ~/.config/zsh-config ] || [ -h ~/.config/zsh-config ]; then 36 if [ -d ~/.config/zsh-config ] || [ -h ~/.config/zsh-config ]; then
37 if [ -d ~/.config/zsh-config ] || [ -h ~/.config/zsh-config ]; then 37 if [ -d ~/.config/zsh-config ] || [ -h ~/.config/zsh-config ]; then
38 rm -rf ~/.config/zsh-config 38 rm -rf ~/.config/zsh-config
39 fi 39 fi
40 # if [ -d ~/.config/oh-my-zsh ] || [ -h ~/.config/oh-my-zsh ]; then 40 # if [ -d ~/.config/oh-my-zsh ] || [ -h ~/.config/oh-my-zsh ]; then
41 # rm -rf ~/.config/oh-my-zsh 41 # rm -rf ~/.config/oh-my-zsh
42 # fi 42 # fi
43 if [ -d ~/.config/antigen ] || [ -h ~/.config/antigen ]; then 43 if [ -d ~/.config/antigen ] || [ -h ~/.config/antigen ]; then
44 rm -rf ~/.config/antigen 44 rm -rf ~/.config/antigen
45 fi 45 fi
46 fi 46 fi
47 47
48 if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then 48 if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then
49 mv ~/.zshrc ~/.zshrc.pre-zsh-cnf 49 mv ~/.zshrc ~/.zshrc.pre-zsh-cnf
50 fi 50 fi
51 # 51 #
52 # BASH: 52 # BASH:
53 # 53 #
54 if [ -f ~/.bashrc ] || [ -h ~/.bashrc ]; then 54 if [ -f ~/.bashrc ] || [ -h ~/.bashrc ]; then
55 mv ~/.bashrc ~/.bashrc.pre-zsh-cnf 55 mv ~/.bashrc ~/.bashrc.pre-zsh-cnf
56 fi 56 fi
57 if [ -f ~/.bash_aliases ] || [ -h ~/.bash_aliases ]; then 57 if [ -f ~/.bash_aliases ] || [ -h ~/.bash_aliases ]; then
58 rm ~/.bash_aliases 58 rm ~/.bash_aliases
59 fi 59 fi
60 60
61 echo "\033[0;34mCloning Zsh Config...\033[0m" 61 echo "\033[0;34mCloning Zsh Config...\033[0m"
62 hash git >/dev/null 2>&1 && env git clone --depth=1 http://git.str8.biz/mj/zsh-config.git $ZCNF || { 62 hash git >/dev/null 2>&1 && env git clone --depth=1 http://git.str8.biz/mj/zsh-config.git $ZCNF || {
63 echo "can't clone repo.." 63 echo "can't clone repo.."
64 exit 1 64 exit 1
65 } 65 }
66 66
67 echo "\033[0;34mUsing the Zsh Config template file and adding it to ~/.zshrc\033[0m" 67 echo "\033[0;34mUsing the Zsh Config template file and adding it to ~/.zshrc\033[0m"
68 ln -s $ZCNF/templates/zshrc.sh ~/.zshrc 68 ln -s $ZCNF/templates/zshrc.sh ~/.zshrc
69 ln -s $ZCNF/templates/bashrc.sh ~/.bashrc 69 ln -s $ZCNF/templates/bashrc.sh ~/.bashrc
70 ln -s $ZCNF/templates/bash_aliases.sh ~/.bash_aliases 70 ln -s $ZCNF/templates/bash_aliases.sh ~/.bash_aliases
71 sed -i -e "/^export ZSH=/ c\\ 71 sed -i -e "/^export ZSH=/ c\\
72 export ZSH=$ZSH 72 export ZSH=$ZSH
73 " ~/.zshrc 73 " ~/.zshrc
74 74
75 echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m" 75 echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m"
76 sed -i -e "/export PATH=/ c\\ 76 sed -i -e "/export PATH=/ c\\
77 export PATH=\"$PATH\" 77 export PATH=\"$PATH\"
78 " ~/.zshrc 78 " ~/.zshrc
79 79
80 if [ "$SHELL" != "$(which zsh)" ]; then 80 if [ "$SHELL" != "$(which zsh)" ]; then
81 echo "\033[0;34mTime to change your default shell to zsh!\033[0m" 81 echo "\033[0;34mTime to change your default shell to zsh!\033[0m"
82 echo "chsh -s $(which zsh)" 82 echo "chsh -s $(which zsh)"
83 fi 83 fi
84 84
85 echo "\033[0;32m"' __ __ '"\033[0m" 85 echo "\033[0;32m"' __ __ '"\033[0m"
86 echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m" 86 echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m"
87 echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m" 87 echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m"
88 echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m" 88 echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m"
89 echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m" 89 echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m"
90 echo "\033[0;32m"' /____/ ....is now installed!'"\033[0m" 90 echo "\033[0;32m"' /____/ ....is now installed!'"\033[0m"
91 echo "\n\n \033[0;32mPlease look over the ~/.zshrc file to select plugins, themes, and options.\033[0m" 91 echo "\n\n \033[0;32mPlease look over the ~/.zshrc file to select plugins, themes, and options.\033[0m"
92 echo "\n\n \033[0;32mp.s. Follow us at http://twitter.com/ohmyzsh.\033[0m" 92 echo "\n\n \033[0;32mp.s. Follow us at http://twitter.com/ohmyzsh.\033[0m"
93 echo "\n\n \033[0;32mp.p.s. Get stickers and t-shirts at http://shop.planetargon.com.\033[0m" 93 echo "\n\n \033[0;32mp.p.s. Get stickers and t-shirts at http://shop.planetargon.com.\033[0m"
94 #env zsh 94 #env zsh
95 #. ~/.zshrc 95 #. ~/.zshrc
96 96