Commit 6303a517273efc340958c999f74f82c7039b279f
1 parent
aa203e431a
Exists in
master
and in
2 other branches
FIX install.sh
Showing 1 changed file with 3 additions and 3 deletions Inline Diff
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 [ "$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 | cp $ZCNF/templates/zshrc.sh ~/.zshrc | 76 | cp $ZCNF/templates/zshrc.sh ~/.zshrc |
| 77 | cp $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 | chsh -s /bin/zsh | 91 | echo "chsh -s /bin/zsh" |
| 92 | fi | 92 | fi |
| 93 | 93 | ||
| 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"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m" | 98 | echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m" |
| 99 | echo "\033[0;32m"' /____/ ....is now installed!'"\033[0m" | 99 | 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" | 100 | 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" | 101 | 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" | 102 | echo "\n\n \033[0;32mp.p.s. Get stickers and t-shirts at http://shop.planetargon.com.\033[0m" |
| 103 | env zsh | 103 | #env zsh |
| 104 | . ~/.zshrc | 104 | #. ~/.zshrc |
| 105 | 105 |