Commit c971203eb91f49708fefbc7bd16ea0c87d70e9ce
1 parent
f74abe779e
Exists in
master
and in
2 other branches
don't install pip, node, etc. by default
Showing 1 changed file with 5 additions and 4 deletions Inline Diff
tools/install.sh
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 zsh |
15 | #sudo apt-get -yq python-setuptools | ||
15 | 16 | ||
16 | sudo easy_install pip | 17 | #sudo easy_install pip |
17 | sudo pip install virtualenvwrapper | 18 | #sudo pip install virtualenvwrapper |
18 | fi | 19 | fi |
19 | 20 | ||
20 | if [ 1 == 1 ]; then | 21 | if [ false ]; then |
21 | mkvirtualenv cb-meteor | 22 | mkvirtualenv cb-meteor |
22 | pip install nodeenv | 23 | pip install nodeenv |
23 | nodeenv -p | 24 | nodeenv -p |
24 | # curl https://install.meteor.com/ | sh | 25 | # curl https://install.meteor.com/ | sh |
25 | fi | 26 | fi |
26 | 27 | ||
27 | if [ ! -n "$ZCNF" ]; then | 28 | if [ ! -n "$ZCNF" ]; then |
28 | ZCNF=~/.config/zsh-config | 29 | ZCNF=~/.config/zsh-config |
29 | fi | 30 | fi |
30 | 31 | ||
31 | if [ ! -n "$ZSH" ]; then | 32 | if [ ! -n "$ZSH" ]; then |
32 | ZSH=$ZCNF/tools/oh-my-zsh | 33 | ZSH=$ZCNF/tools/oh-my-zsh |
33 | fi | 34 | fi |
34 | 35 | ||
35 | echo "\033[0;34mCleaning...\033[0m" | 36 | echo "\033[0;34mCleaning...\033[0m" |
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 | if [ -d ~/.config/zsh-config ] || [ -h ~/.config/zsh-config ]; then |
38 | rm -rf ~/.config/zsh-config | 39 | rm -rf ~/.config/zsh-config |
39 | fi | 40 | fi |
40 | # if [ -d ~/.config/oh-my-zsh ] || [ -h ~/.config/oh-my-zsh ]; then | 41 | # if [ -d ~/.config/oh-my-zsh ] || [ -h ~/.config/oh-my-zsh ]; then |
41 | # rm -rf ~/.config/oh-my-zsh | 42 | # rm -rf ~/.config/oh-my-zsh |
42 | # fi | 43 | # fi |
43 | if [ -d ~/.config/antigen ] || [ -h ~/.config/antigen ]; then | 44 | if [ -d ~/.config/antigen ] || [ -h ~/.config/antigen ]; then |
44 | rm -rf ~/.config/antigen | 45 | rm -rf ~/.config/antigen |
45 | fi | 46 | fi |
46 | fi | 47 | fi |
47 | 48 | ||
48 | if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then | 49 | if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then |
49 | mv ~/.zshrc ~/.zshrc.pre-zsh-cnf | 50 | mv ~/.zshrc ~/.zshrc.pre-zsh-cnf |
50 | fi | 51 | fi |
51 | # | 52 | # |
52 | # BASH: | 53 | # BASH: |
53 | # | 54 | # |
54 | if [ -f ~/.bashrc ] || [ -h ~/.bashrc ]; then | 55 | if [ -f ~/.bashrc ] || [ -h ~/.bashrc ]; then |
55 | mv ~/.bashrc ~/.bashrc.pre-zsh-cnf | 56 | mv ~/.bashrc ~/.bashrc.pre-zsh-cnf |
56 | fi | 57 | fi |
57 | if [ -f ~/.bash_aliases ] || [ -h ~/.bash_aliases ]; then | 58 | if [ -f ~/.bash_aliases ] || [ -h ~/.bash_aliases ]; then |
58 | rm ~/.bash_aliases | 59 | rm ~/.bash_aliases |
59 | fi | 60 | fi |
60 | 61 | ||
61 | echo "\033[0;34mCloning Zsh Config...\033[0m" | 62 | 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 || { | 63 | 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.." | 64 | echo "can't clone repo.." |
64 | exit 1 | 65 | exit 1 |
65 | } | 66 | } |
66 | 67 | ||
67 | echo "\033[0;34mUsing the Zsh Config template file and adding it to ~/.zshrc\033[0m" | 68 | echo "\033[0;34mUsing the Zsh Config template file and adding it to ~/.zshrc\033[0m" |
68 | ln -s $ZCNF/templates/zshrc.sh ~/.zshrc | 69 | ln -s $ZCNF/templates/zshrc.sh ~/.zshrc |
69 | ln -s $ZCNF/templates/bashrc.sh ~/.bashrc | 70 | ln -s $ZCNF/templates/bashrc.sh ~/.bashrc |
70 | ln -s $ZCNF/templates/bash_aliases.sh ~/.bash_aliases | 71 | ln -s $ZCNF/templates/bash_aliases.sh ~/.bash_aliases |
71 | sed -i -e "/^export ZSH=/ c\\ | 72 | sed -i -e "/^export ZSH=/ c\\ |
72 | export ZSH=$ZSH | 73 | export ZSH=$ZSH |
73 | " ~/.zshrc | 74 | " ~/.zshrc |
74 | 75 | ||
75 | echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m" | 76 | 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\\ | 77 | sed -i -e "/export PATH=/ c\\ |
77 | export PATH=\"$PATH\" | 78 | export PATH=\"$PATH\" |
78 | " ~/.zshrc | 79 | " ~/.zshrc |
79 | 80 | ||
80 | if [ "$SHELL" != "$(which zsh)" ]; then | 81 | if [ "$SHELL" != "$(which zsh)" ]; then |
81 | echo "\033[0;34mTime to change your default shell to zsh!\033[0m" | 82 | echo "\033[0;34mTime to change your default shell to zsh!\033[0m" |
82 | echo "chsh -s $(which zsh)" | 83 | echo "chsh -s $(which zsh)" |
83 | fi | 84 | fi |
84 | 85 | ||
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"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m" |
90 | echo "\033[0;32m"' /____/ ....is now installed!'"\033[0m" | 91 | 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" | 92 | 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" | 93 | 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" | 94 | echo "\n\n \033[0;32mp.p.s. Get stickers and t-shirts at http://shop.planetargon.com.\033[0m" |
94 | #env zsh | 95 | #env zsh |
95 | #. ~/.zshrc | 96 | #. ~/.zshrc |
96 | 97 |