Commit 8767cd3ed6bddcacbc9f0f41325e5a7616a4047c

Authored by mj
1 parent 9284fee2bf
Exists in master and in 1 other branch 02-merge

[IMP] Don't install screen

Showing 1 changed file with 1 additions and 1 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 [ ! -n "$DONTINSTALL" ]; then 15 if [ ! -n "$DONTINSTALL" ]; then
16 DONTINSTALL="1" 16 DONTINSTALL="1"
17 fi 17 fi
18 18
19 if [ "$DONTINSTALL" eq "0" ]; then 19 if [ "$DONTINSTALL" eq "0" ]; then
20 echo "~~~ INSTALLING ~~~" 20 echo "~~~ INSTALLING ~~~"
21 21
22 if [ -d /proc/vz ] && [ ! -d /proc/vz/beancounter ]; then 22 if [ -d /proc/vz ] && [ ! -d /proc/vz/beancounter ]; then
23 apt-get -yq install curl dialog git nano screen zsh 23 apt-get -yq install curl dialog git zsh
24 else 24 else
25 if [ "$UID" != 0 ]; then CMD_PREFIX="sudo"; else CMD_PREFIX=""; fi 25 if [ "$UID" != 0 ]; then CMD_PREFIX="sudo"; else CMD_PREFIX=""; fi
26 26
27 if [ "$SHELL" != "$(which zsh)" ]; then 27 if [ "$SHELL" != "$(which zsh)" ]; then
28 echo "$(which zsh)" 28 echo "$(which zsh)"
29 $CMD_PREFIX echo "enter pass...." 29 $CMD_PREFIX echo "enter pass...."
30 30
31 echo "ok" 31 echo "ok"
32 32
33 $CMD_PREFIX apt-get -yq install curl dialog git nano zsh 33 $CMD_PREFIX apt-get -yq install curl dialog git nano zsh
34 fi 34 fi
35 fi 35 fi
36 fi 36 fi
37 37
38 if [ ! -n "$HOME" ]; then 38 if [ ! -n "$HOME" ]; then
39 HOME=~/ 39 HOME=~/
40 fi 40 fi
41 41
42 if [ ! -n "$ZCNF" ]; then 42 if [ ! -n "$ZCNF" ]; then
43 ZCNF=$HOME/.config/zsh-config 43 ZCNF=$HOME/.config/zsh-config
44 fi 44 fi
45 45
46 if [ ! -n "$ZSH" ]; then 46 if [ ! -n "$ZSH" ]; then
47 ZSH=$ZCNF/repos/oh-my-zsh 47 ZSH=$ZCNF/repos/oh-my-zsh
48 fi 48 fi
49 49
50 echo "\033[0;34mCleaning...\033[0m" 50 echo "\033[0;34mCleaning...\033[0m"
51 if [ -d ~/.config/zsh-config ] || [ -h ~/.config/zsh-config ]; then 51 if [ -d ~/.config/zsh-config ] || [ -h ~/.config/zsh-config ]; then
52 rm -rf ~/.config/zsh-config 52 rm -rf ~/.config/zsh-config
53 fi 53 fi
54 54
55 if [ -d ~/.config/oh-my-zsh ] || [ -h ~/.config/oh-my-zsh ]; then 55 if [ -d ~/.config/oh-my-zsh ] || [ -h ~/.config/oh-my-zsh ]; then
56 rm -rf ~/.config/oh-my-zsh 56 rm -rf ~/.config/oh-my-zsh
57 fi 57 fi
58 58
59 if [ -d ~/.config/antigen ] || [ -h ~/.config/antigen ]; then 59 if [ -d ~/.config/antigen ] || [ -h ~/.config/antigen ]; then
60 rm -rf ~/.config/antigen 60 rm -rf ~/.config/antigen
61 fi 61 fi
62 62
63 if [ -d ~/.oh-my-zsh ] || [ -h ~/.oh-my-zsh ]; then 63 if [ -d ~/.oh-my-zsh ] || [ -h ~/.oh-my-zsh ]; then
64 rm -rf ~/.oh-my-zsh 64 rm -rf ~/.oh-my-zsh
65 fi 65 fi
66 66
67 if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then 67 if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then
68 mv ~/.zshrc ~/.zshrc.pre-zsh-cnf 68 mv ~/.zshrc ~/.zshrc.pre-zsh-cnf
69 fi 69 fi
70 70
71 # 71 #
72 # BASH: 72 # BASH:
73 # 73 #
74 if [ -f ~/.bashrc ] || [ -h ~/.bashrc ]; then 74 if [ -f ~/.bashrc ] || [ -h ~/.bashrc ]; then
75 mv ~/.bashrc ~/.bashrc.pre-zsh-cnf 75 mv ~/.bashrc ~/.bashrc.pre-zsh-cnf
76 fi 76 fi
77 if [ -f ~/.bash_aliases ] || [ -h ~/.bash_aliases ]; then 77 if [ -f ~/.bash_aliases ] || [ -h ~/.bash_aliases ]; then
78 rm ~/.bash_aliases 78 rm ~/.bash_aliases
79 fi 79 fi
80 80
81 echo "\033[0;34mCloning Zsh Config...\033[0m" 81 echo "\033[0;34mCloning Zsh Config...\033[0m"
82 hash git >/dev/null 2>&1 && env git clone --branch master --single-branch --depth=1 http://git.str8.biz/mj/zsh-config.git $ZCNF || { 82 hash git >/dev/null 2>&1 && env git clone --branch master --single-branch --depth=1 http://git.str8.biz/mj/zsh-config.git $ZCNF || {
83 echo "can't clone repo.." 83 echo "can't clone repo.."
84 exit 1 84 exit 1
85 } 85 }
86 86
87 echo "\033[0;34mUsing the Zsh Config template file and adding it to ~/.zshrc\033[0m" 87 echo "\033[0;34mUsing the Zsh Config template file and adding it to ~/.zshrc\033[0m"
88 cp $ZCNF/templates/zshrc.sh ~/.zshrc 88 cp $ZCNF/templates/zshrc.sh ~/.zshrc
89 cp $ZCNF/templates/bashrc.sh ~/.bashrc 89 cp $ZCNF/templates/bashrc.sh ~/.bashrc
90 90
91 #sed -i -e "/^export ZSH=/ c\\ 91 #sed -i -e "/^export ZSH=/ c\\
92 #export ZSH=$ZSH 92 #export ZSH=$ZSH
93 #" ~/.zshrc 93 #" ~/.zshrc
94 94
95 echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m" 95 echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m"
96 sed -i -e "/export PATH=/ c\\ 96 sed -i -e "/export PATH=/ c\\
97 export PATH=\"$PATH\" 97 export PATH=\"$PATH\"
98 " ~/.zshrc 98 " ~/.zshrc
99 99
100 if [ "$SHELL" != "$(which zsh)" ]; then 100 if [ "$SHELL" != "$(which zsh)" ]; then
101 echo "\033[0;34mTime to change your default shell to zsh!\033[0m" 101 echo "\033[0;34mTime to change your default shell to zsh!\033[0m"
102 # echo "chsh -s $(which zsh)" 102 # echo "chsh -s $(which zsh)"
103 echo "chsh -s /bin/zsh" 103 echo "chsh -s /bin/zsh"
104 fi 104 fi
105 105
106 echo "\033[0;32m"' __ __ '"\033[0m" 106 echo "\033[0;32m"' __ __ '"\033[0m"
107 echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m" 107 echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m"
108 echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m" 108 echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m"
109 echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m" 109 echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m"
110 echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m" 110 echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m"
111 echo "\033[0;32m"' /____/ ....is now installed!'"\033[0m" 111 echo "\033[0;32m"' /____/ ....is now installed!'"\033[0m"
112 echo "\n\n \033[0;32mPlease look over the ~/.zshrc file to select plugins, themes, and options.\033[0m" 112 echo "\n\n \033[0;32mPlease look over the ~/.zshrc file to select plugins, themes, and options.\033[0m"
113 echo "\n\n \033[0;32mp.s. Follow us at http://twitter.com/ohmyzsh.\033[0m" 113 echo "\n\n \033[0;32mp.s. Follow us at http://twitter.com/ohmyzsh.\033[0m"
114 echo "\n\n \033[0;32mp.p.s. Get stickers and t-shirts at http://shop.planetargon.com.\033[0m" 114 echo "\n\n \033[0;32mp.p.s. Get stickers and t-shirts at http://shop.planetargon.com.\033[0m"
115 #env zsh 115 #env zsh
116 #. ~/.zshrc 116 #. ~/.zshrc
117 117