Commit 583d10f4da0d8445d32cf5f452b29c49f77c1af5
Exists in
master
and in
2 other branches
Merge branch 'master' of git.str8.biz:mj/zsh-config
Showing 2 changed files Inline Diff
templates/zshrc.sh
1 | #@IgnoreInspection AddShebang | 1 | #@IgnoreInspection AddShebang |
2 | 2 | ||
3 | export ZCFG=$HOME/.config/zsh-config | 3 | export ZCFG=$HOME/.config/zsh-config |
4 | export ZCFG_SPLIT=1 | ||
4 | 5 | ||
5 | # ENVIRONMENT: | 6 | # Environment |
6 | export GJ_ENV=local_aptproxy | 7 | export GJ_ENV=local_aptproxy |
7 | |||
8 | export LANG=en_US.UTF-8 | 8 | export LANG=en_US.UTF-8 |
9 | |||
10 | # Compilation flags | ||
11 | export ARCHFLAGS="-arch x86_64" | 9 | export ARCHFLAGS="-arch x86_64" |
12 | 10 | ||
13 | # User configuration | 11 | # User configuration |
14 | export PATH=$HOME/bin:/usr/local/bin:$PATH | 12 | export PATH=$HOME/bin:/usr/local/bin:$PATH |
15 | # export MANPATH="/usr/local/man:$MANPATH" | 13 | # export MANPATH="/usr/local/man:$MANPATH" |
16 | 14 | ||
17 | plugins=( | 15 | plugins=( |
18 | #meteor node npm | 16 | # meteor |
17 | # node npm | ||
19 | ) | 18 | ) |
20 | 19 | ||
21 | # Aliases | 20 | # Main .zshrc |
22 | if [ -f $ZCFG/dotfiles/zshrc.sh ]; then | 21 | if [ -f $ZCFG/dotfiles/zshrc.sh ]; then |
tools/install.sh
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 [ "$UID" != "0" ]; then CMD_PREFIX="sudo"; else CMD_PREFIX=""; fi | 15 | if [ -d /proc/vz ] && [ ! -d /proc/vz/beancounter ]; then |
16 | apt-get -yq install curl dialog git nano zsh | ||
17 | else | ||
18 | if [ "$UID" != "0" ]; then CMD_PREFIX="sudo"; else CMD_PREFIX=""; fi | ||
16 | 19 | ||
17 | if [ "$SHELL" != "$(which zsh)" ]; then | 20 | if [ "$SHELL" != "$(which zsh)" ]; then |
18 | echo "$(which zsh)" | 21 | echo "$(which zsh)" |
19 | $CMD_PREFIX echo "enter pass...." | 22 | $CMD_PREFIX echo "enter pass...." |
20 | |||
21 | echo "ok" | ||
22 | |||
23 | $CMD_PREFIX apt-get -yq install curl dialog git nano zsh | ||
24 | fi | ||
25 | |||
26 | if [ 1 == 2 ]; then | ||
27 | #sudo apt-get -yq python-setuptools | ||
28 | |||
29 | #sudo easy_install pip | ||
30 | #sudo pip install virtualenvwrapper | ||
31 | 23 | ||
32 | mkvirtualenv cb-meteor | 24 | echo "ok" |
33 | pip install nodeenv | ||
34 | nodeenv -p | ||
35 | 25 | ||
36 | # curl https://install.meteor.com/ | sh | 26 | $CMD_PREFIX apt-get -yq install curl dialog git nano zsh |
27 | fi | ||
37 | fi | 28 | fi |
38 | 29 | ||
39 | if [ ! -n "$HOME" ]; then | 30 | if [ ! -n "$HOME" ]; then |
40 | HOME=~/ | 31 | HOME=~/ |
41 | fi | 32 | fi |
42 | 33 | ||
43 | if [ ! -n "$ZCNF" ]; then | 34 | if [ ! -n "$ZCNF" ]; then |
44 | ZCNF=$HOME/.config/zsh-config | 35 | ZCNF=$HOME/.config/zsh-config |
45 | fi | 36 | fi |
46 | 37 | ||
47 | if [ ! -n "$ZSH" ]; then | 38 | if [ ! -n "$ZSH" ]; then |
48 | ZSH=$ZCNF/packages/oh-my-zsh | 39 | ZSH=$ZCNF/packages/oh-my-zsh |
49 | fi | 40 | fi |
50 | 41 | ||
51 | echo "\033[0;34mCleaning...\033[0m" | 42 | echo "\033[0;34mCleaning...\033[0m" |
52 | if [ -d ~/.config/zsh-config ] || [ -h ~/.config/zsh-config ]; then | 43 | if [ -d ~/.config/zsh-config ] || [ -h ~/.config/zsh-config ]; then |
53 | rm -rf ~/.config/zsh-config | 44 | rm -rf ~/.config/zsh-config |
54 | fi | 45 | fi |
55 | 46 | ||
56 | if [ -d ~/.config/oh-my-zsh ] || [ -h ~/.config/oh-my-zsh ]; then | 47 | if [ -d ~/.config/oh-my-zsh ] || [ -h ~/.config/oh-my-zsh ]; then |
57 | rm -rf ~/.config/oh-my-zsh | 48 | rm -rf ~/.config/oh-my-zsh |
58 | fi | 49 | fi |
59 | 50 | ||
60 | if [ -d ~/.config/antigen ] || [ -h ~/.config/antigen ]; then | 51 | if [ -d ~/.config/antigen ] || [ -h ~/.config/antigen ]; then |
61 | rm -rf ~/.config/antigen | 52 | rm -rf ~/.config/antigen |
62 | fi | 53 | fi |
63 | 54 | ||
64 | if [ -d ~/.oh-my-zsh ] || [ -h ~/.oh-my-zsh ]; then | 55 | if [ -d ~/.oh-my-zsh ] || [ -h ~/.oh-my-zsh ]; then |
65 | rm -rf ~/.oh-my-zsh | 56 | rm -rf ~/.oh-my-zsh |
66 | fi | 57 | fi |
67 | 58 | ||
68 | if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then | 59 | if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then |
69 | mv ~/.zshrc ~/.zshrc.pre-zsh-cnf | 60 | mv ~/.zshrc ~/.zshrc.pre-zsh-cnf |
70 | fi | 61 | fi |
71 | 62 | ||
72 | # | 63 | # |
73 | # BASH: | 64 | # BASH: |
74 | # | 65 | # |
75 | if [ -f ~/.bashrc ] || [ -h ~/.bashrc ]; then | 66 | if [ -f ~/.bashrc ] || [ -h ~/.bashrc ]; then |
76 | mv ~/.bashrc ~/.bashrc.pre-zsh-cnf | 67 | mv ~/.bashrc ~/.bashrc.pre-zsh-cnf |
77 | fi | 68 | fi |
78 | if [ -f ~/.bash_aliases ] || [ -h ~/.bash_aliases ]; then | 69 | if [ -f ~/.bash_aliases ] || [ -h ~/.bash_aliases ]; then |
79 | rm ~/.bash_aliases | 70 | rm ~/.bash_aliases |
80 | fi | 71 | fi |
81 | 72 | ||
82 | echo "\033[0;34mCloning Zsh Config...\033[0m" | 73 | echo "\033[0;34mCloning Zsh Config...\033[0m" |
83 | hash git >/dev/null 2>&1 && env git clone --depth=1 http://git.str8.biz/mj/zsh-config.git $ZCNF || { | 74 | hash git >/dev/null 2>&1 && env git clone --depth=1 http://git.str8.biz/mj/zsh-config.git $ZCNF || { |
84 | echo "can't clone repo.." | 75 | echo "can't clone repo.." |
85 | exit 1 | 76 | exit 1 |
86 | } | 77 | } |
87 | 78 | ||
88 | echo "\033[0;34mUsing the Zsh Config template file and adding it to ~/.zshrc\033[0m" | 79 | echo "\033[0;34mUsing the Zsh Config template file and adding it to ~/.zshrc\033[0m" |
89 | cp $ZCNF/templates/zshrc.sh ~/.zshrc | 80 | cp $ZCNF/templates/zshrc.sh ~/.zshrc |
90 | cp $ZCNF/templates/bashrc.sh ~/.bashrc | 81 | cp $ZCNF/templates/bashrc.sh ~/.bashrc |
91 | 82 | ||
92 | #sed -i -e "/^export ZSH=/ c\\ | 83 | #sed -i -e "/^export ZSH=/ c\\ |
93 | #export ZSH=$ZSH | 84 | #export ZSH=$ZSH |
94 | #" ~/.zshrc | 85 | #" ~/.zshrc |
95 | 86 | ||
96 | echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m" | 87 | echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m" |
97 | sed -i -e "/export PATH=/ c\\ | 88 | sed -i -e "/export PATH=/ c\\ |
98 | export PATH=\"$PATH\" | 89 | export PATH=\"$PATH\" |
99 | " ~/.zshrc | 90 | " ~/.zshrc |
100 | 91 | ||
101 | if [ "$SHELL" != "$(which zsh)" ]; then | 92 | if [ "$SHELL" != "$(which zsh)" ]; then |
102 | echo "\033[0;34mTime to change your default shell to zsh!\033[0m" | 93 | echo "\033[0;34mTime to change your default shell to zsh!\033[0m" |
103 | # echo "chsh -s $(which zsh)" | 94 | # echo "chsh -s $(which zsh)" |
104 | echo "chsh -s /bin/zsh" | 95 | echo "chsh -s /bin/zsh" |
105 | fi | 96 | fi |
106 | 97 | ||
107 | echo "\033[0;32m"' __ __ '"\033[0m" | 98 | echo "\033[0;32m"' __ __ '"\033[0m" |
108 | echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m" | 99 | echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m" |
109 | echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m" | 100 | echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m" |
110 | echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m" | 101 | echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m" |
111 | echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m" | 102 | echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m" |
112 | echo "\033[0;32m"' /____/ ....is now installed!'"\033[0m" | 103 | echo "\033[0;32m"' /____/ ....is now installed!'"\033[0m" |
113 | echo "\n\n \033[0;32mPlease look over the ~/.zshrc file to select plugins, themes, and options.\033[0m" | 104 | echo "\n\n \033[0;32mPlease look over the ~/.zshrc file to select plugins, themes, and options.\033[0m" |
114 | echo "\n\n \033[0;32mp.s. Follow us at http://twitter.com/ohmyzsh.\033[0m" | 105 | echo "\n\n \033[0;32mp.s. Follow us at http://twitter.com/ohmyzsh.\033[0m" |