Commit 1cd2417b7be01bc40cfb938b84f5a937f2d01c7c

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

install.sh - small changes

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

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