Commit b6a161bbf87c7a2512ff375a157e381563bfd87f

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

FIX install & zshrc

Showing 2 changed files with 6 additions and 4 deletions Inline Diff

1 #@IgnoreInspection AddShebang 1 #@IgnoreInspection AddShebang
2 # ENVIRONMENT: 2 # ENVIRONMENT:
3 export GJ_DEVENV=local_aptproxy 3 export GJ_DEVENV=local_aptproxy
4 4
5 export ZCFG=~/.config/zsh-config 5 export ZCFG=~/.config/zsh-config
6 # Path to your oh-my-zsh installation. 6 # Path to your oh-my-zsh installation.
7 export ZSH=$ZCFG/packages/oh-my-zsh 7 export ZSH=$ZCFG/packages/oh-my-zsh
8 8
9 export LANG=en_US.UTF-8 9 export LANG=en_US.UTF-8
10 10
11 # Compilation flags 11 # Compilation flags
12 export ARCHFLAGS="-arch x86_64" 12 export ARCHFLAGS="-arch x86_64"
13 13
14 # Themes are in (...)/oh-my-zsh/themes/ or "random" 14 # Themes are in (...)/oh-my-zsh/themes/ or "random"
15 ZSH_THEME="muse" 15 ZSH_THEME="muse"
16 16
17 CASE_SENSITIVE="true" 17 CASE_SENSITIVE="true"
18 DISABLE_AUTO_UPDATE="true" 18 DISABLE_AUTO_UPDATE="true"
19 DISABLE_AUTO_TITLE="true" 19 DISABLE_AUTO_TITLE="true"
20 ENABLE_CORRECTION="true" 20 ENABLE_CORRECTION="true"
21 COMPLETION_WAITING_DOTS="true" 21 COMPLETION_WAITING_DOTS="true"
22 DISABLE_UNTRACKED_FILES_DIRTY="true" 22 DISABLE_UNTRACKED_FILES_DIRTY="true"
23 HIST_STAMPS="dd.mm.yyyy" 23 HIST_STAMPS="dd.mm.yyyy"
24 ZSH_CUSTOM=ZCFG/custom 24 ZSH_CUSTOM=ZCFG/custom
25 25
26 plugins=(command-not-found common-aliases debian dirhistory git history history-substring-search systemadmin zsh_reload 26 plugins=(command-not-found common-aliases debian dirhistory git history history-substring-search systemadmin zsh_reload
27 pip python virtualenv virtualenvwrapper 27 pip python virtualenv virtualenvwrapper
28 meteor node npm 28 meteor node npm
29 ) 29 )
30 30
31 if [ -f ~/.config/zsh-config/templates/bash_aliases ]; then 31 if [ -f ~/.config/zsh-config/templates/bash_aliases ]; then
32 . ~/.config/zsh-config/templates/bash_aliases 32 . ~/.config/zsh-config/templates/bash_aliases
33 fi 33 fi
34 34
35 # User configuration 35 # User configuration
36 export PATH=$HOME/bin:/usr/local/bin:$PATH 36 export PATH=$HOME/bin:/usr/local/bin:$PATH
37 # export MANPATH="/usr/local/man:$MANPATH" 37 # export MANPATH="/usr/local/man:$MANPATH"
38 38
39 source $ZSH/oh-my-zsh.sh 39 source ~/.zshrc
40
41 # source $ZSH/oh-my-zsh.sh
40 42
41 # ANTIGEN: 43 # ANTIGEN:
42 # 44 #
43 # source $ZCFG/packages/antigen/antigen.zsh 45 # source $ZCFG/packages/antigen/antigen.zsh
44 # 46 #
45 # MUST: 47 # MUST:
46 #antigen bundle extract 48 #antigen bundle extract
47 # 49 #
48 # 50 #
49 # NICE: 51 # NICE:
50 #antigen bundle iwhois 52 #antigen bundle iwhois
51 #antigen bundle screen 53 #antigen bundle screen
52 #antigen bundle ssh-agent 54 #antigen bundle ssh-agent
53 #antigen bundle web-search 55 #antigen bundle web-search
54 # # if webdev: 56 # # if webdev:
55 #antigen bundle catimg 57 #antigen bundle catimg
56 # 58 #
57 # docker: 59 # docker:
58 #antigen bundle docker 60 #antigen bundle docker
59 # 61 #
60 # kde: 62 # kde:
61 #antigen bundle kate 63 #antigen bundle kate
62 # 64 #
63 # removed: 65 # removed:
64 #antigen bundle autoenv 66 #antigen bundle autoenv
65 #antigen bundle iwhois 67 #antigen bundle iwhois
66 #antigen bundle per-directory-history 68 #antigen bundle per-directory-history
67 #antigen bundle screen 69 #antigen bundle screen
68 # 70 #
69 # THEME #---------- 71 # THEME #----------
70 # 72 #
71 #antigen theme muse 73 #antigen theme muse
72 # 74 #
73 #antigen apply 75 #antigen apply
74 76
75 # ssh 77 # ssh
76 # export SSH_KEY_PATH="~/.ssh/id_rsa" 78 # export SSH_KEY_PATH="~/.ssh/id_rsa"
77 # zstyle :omz:plugins:ssh-agent agent-forwarding on 79 # zstyle :omz:plugins:ssh-agent agent-forwarding on
78 80
79 # Preferred editor for local and remote sessions 81 # Preferred editor for local and remote sessions
80 # if [[ -n $SSH_CONNECTION ]]; then 82 # if [[ -n $SSH_CONNECTION ]]; then
81 # export EDITOR='vim' 83 # export EDITOR='vim'
82 # else 84 # else
83 # export EDITOR='mvim' 85 # export EDITOR='mvim'
84 # fi 86 # fi
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 #sudo apt-get -yq python-setuptools 22 #sudo apt-get -yq python-setuptools
23 23
24 #sudo easy_install pip 24 #sudo easy_install pip
25 #sudo pip install virtualenvwrapper 25 #sudo pip install virtualenvwrapper
26 fi 26 fi
27 27
28 if [ 1 == 2 ]; then 28 if [ 1 == 2 ]; then
29 mkvirtualenv cb-meteor 29 mkvirtualenv cb-meteor
30 pip install nodeenv 30 pip install nodeenv
31 nodeenv -p 31 nodeenv -p
32 # curl https://install.meteor.com/ | sh 32 # curl https://install.meteor.com/ | sh
33 fi 33 fi
34 34
35 if [ ! -n "$ZCNF" ]; then 35 if [ ! -n "$ZCNF" ]; then
36 ZCNF=~/.config/zsh-config 36 ZCNF=~/.config/zsh-config
37 fi 37 fi
38 38
39 if [ ! -n "$ZSH" ]; then 39 if [ ! -n "$ZSH" ]; then
40 ZSH=$ZCNF/packages/oh-my-zsh 40 ZSH=$ZCNF/packages/oh-my-zsh
41 fi 41 fi
42 42
43 echo "\033[0;34mCleaning...\033[0m" 43 echo "\033[0;34mCleaning...\033[0m"
44 if [ -d ~/.config/zsh-config ] || [ -h ~/.config/zsh-config ]; then 44 if [ -d ~/.config/zsh-config ] || [ -h ~/.config/zsh-config ]; then
45 if [ -d ~/.config/zsh-config ] || [ -h ~/.config/zsh-config ]; then 45 if [ -d ~/.config/zsh-config ] || [ -h ~/.config/zsh-config ]; then
46 rm -rf ~/.config/zsh-config 46 rm -rf ~/.config/zsh-config
47 fi 47 fi
48 # if [ -d ~/.config/oh-my-zsh ] || [ -h ~/.config/oh-my-zsh ]; then 48 # if [ -d ~/.config/oh-my-zsh ] || [ -h ~/.config/oh-my-zsh ]; then
49 # rm -rf ~/.config/oh-my-zsh 49 # rm -rf ~/.config/oh-my-zsh
50 # fi 50 # fi
51 if [ -d ~/.config/antigen ] || [ -h ~/.config/antigen ]; then 51 if [ -d ~/.config/antigen ] || [ -h ~/.config/antigen ]; then
52 rm -rf ~/.config/antigen 52 rm -rf ~/.config/antigen
53 fi 53 fi
54 fi 54 fi
55 55
56 if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then 56 if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then
57 mv ~/.zshrc ~/.zshrc.pre-zsh-cnf 57 mv ~/.zshrc ~/.zshrc.pre-zsh-cnf
58 fi 58 fi
59 # 59 #
60 # BASH: 60 # BASH:
61 # 61 #
62 if [ -f ~/.bashrc ] || [ -h ~/.bashrc ]; then 62 if [ -f ~/.bashrc ] || [ -h ~/.bashrc ]; then
63 mv ~/.bashrc ~/.bashrc.pre-zsh-cnf 63 mv ~/.bashrc ~/.bashrc.pre-zsh-cnf
64 fi 64 fi
65 if [ -f ~/.bash_aliases ] || [ -h ~/.bash_aliases ]; then 65 if [ -f ~/.bash_aliases ] || [ -h ~/.bash_aliases ]; then
66 rm ~/.bash_aliases 66 rm ~/.bash_aliases
67 fi 67 fi
68 68
69 echo "\033[0;34mCloning Zsh Config...\033[0m" 69 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 || { 70 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.." 71 echo "can't clone repo.."
72 exit 1 72 exit 1
73 } 73 }
74 74
75 echo "\033[0;34mUsing the Zsh Config template file and adding it to ~/.zshrc\033[0m" 75 echo "\033[0;34mUsing the Zsh Config template file and adding it to ~/.zshrc\033[0m"
76 ln -s $ZCNF/templates/zshrc.sh ~/.zshrc 76 cp $ZCNF/templates/zshrc.sh ~/.zshrc
77 ln -s $ZCNF/templates/bashrc.sh ~/.bashrc 77 cp $ZCNF/templates/bashrc.sh ~/.bashrc
78 ln -s $ZCNF/templates/bash_aliases.sh ~/.bash_aliases 78 # ln -s $ZCNF/templates/bash_aliases.sh ~/.bash_aliases
79 sed -i -e "/^export ZSH=/ c\\ 79 sed -i -e "/^export ZSH=/ c\\
80 export ZSH=$ZSH 80 export ZSH=$ZSH
81 " ~/.zshrc 81 " ~/.zshrc
82 82
83 echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m" 83 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\\ 84 sed -i -e "/export PATH=/ c\\
85 export PATH=\"$PATH\" 85 export PATH=\"$PATH\"
86 " ~/.zshrc 86 " ~/.zshrc
87 87
88 if [ "$SHELL" != "$(which zsh)" ]; then 88 if [ "$SHELL" != "$(which zsh)" ]; then
89 echo "\033[0;34mTime to change your default shell to zsh!\033[0m" 89 echo "\033[0;34mTime to change your default shell to zsh!\033[0m"
90 echo "chsh -s $(which zsh)" 90 echo "chsh -s $(which zsh)"
91 fi 91 fi
92 92
93 echo "\033[0;32m"' __ __ '"\033[0m" 93 echo "\033[0;32m"' __ __ '"\033[0m"
94 echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m" 94 echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m"
95 echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m" 95 echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m"
96 echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m" 96 echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m"
97 echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m" 97 echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m"
98 echo "\033[0;32m"' /____/ ....is now installed!'"\033[0m" 98 echo "\033[0;32m"' /____/ ....is now installed!'"\033[0m"
99 echo "\n\n \033[0;32mPlease look over the ~/.zshrc file to select plugins, themes, and options.\033[0m" 99 echo "\n\n \033[0;32mPlease look over the ~/.zshrc file to select plugins, themes, and options.\033[0m"
100 echo "\n\n \033[0;32mp.s. Follow us at http://twitter.com/ohmyzsh.\033[0m" 100 echo "\n\n \033[0;32mp.s. Follow us at http://twitter.com/ohmyzsh.\033[0m"
101 echo "\n\n \033[0;32mp.p.s. Get stickers and t-shirts at http://shop.planetargon.com.\033[0m" 101 echo "\n\n \033[0;32mp.p.s. Get stickers and t-shirts at http://shop.planetargon.com.\033[0m"
102 #env zsh 102 #env zsh
103 #. ~/.zshrc 103 #. ~/.zshrc
104 104