From 1658e6de947ba53c7e633fcf1bca90933feae97d Mon Sep 17 00:00:00 2001 From: gryf Date: Wed, 29 Apr 2020 10:28:12 +0200 Subject: [PATCH] Added openrc to bashrc, fixed some shellcheck issues --- bootstrap_ubuntu.sh | 85 ++++++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 40 deletions(-) diff --git a/bootstrap_ubuntu.sh b/bootstrap_ubuntu.sh index e0d69a0..295ee3f 100755 --- a/bootstrap_ubuntu.sh +++ b/bootstrap_ubuntu.sh @@ -12,44 +12,43 @@ # 1. update sudo apt update && sudo apt -y upgrade -lsb_release -cs 2>/dev/null | grep -q bionic -if [[ $? -eq 0 ]]; then - PGS="ccze - exuberant-ctags - flake8 - git-review - htop - ipython3 - mc - python-apsw - python-flake8 - python-jedi - python-pip - python3-flake8 - python3-jedi - silversearcher-ag - tmate - vim-gtk" +if lsb_release -cs 2>/dev/null | grep -q bionic; then + PGS=(ccze + exuberant-ctags + flake8 + git-review + htop + ipython3 + mc + python-apsw + python-flake8 + python-jedi + python-pip + python3-flake8 + python3-jedi + silversearcher-ag + tmate + vim-gtk) else - PGS="ccze - exuberant-ctags - flake8 - git-review - htop - ipython - mc - python-apsw - python-flake8 - python-jedi - python-pip - python3-flake8 - python3-jedi - silversearcher-ag - vim-gtk-py2" + PGS=(ccze + exuberant-ctags + flake8 + git-review + htop + ipython + mc + python-apsw + python-flake8 + python-jedi + python-pip + python3-flake8 + python3-jedi + silversearcher-ag + vim-gtk-py2) fi # 2. install tools -sudo apt install -y $PGS +sudo apt install -y "${PGS[@]}" # 3. cleanup sudo apt-get autoremove -y && sudo apt-get autoclean -y @@ -65,19 +64,25 @@ sudo pip install remote_pdb rainbow cp .bash_prompt ~/ cp .tmux.conf ~/ # v and y like vi in copy-mode -echo "bind-key -T copy-mode-vi 'v' send -X begin-selection" >> ~/.tmux.conf -echo "bind-key -T copy-mode-vi 'y' send -X copy-selection" >> ~/.tmux.conf +{ + echo "bind-key -T copy-mode-vi 'v' send -X begin-selection" + echo "bind-key -T copy-mode-vi 'y' send -X copy-selection" +} >> ~/.tmux.conf cp .gitconfig ~/ cp cleanup.sh ~/ -echo '. ~/.bash_prompt' >> ~/.bashrc -echo "alias ip='ip -c'" >> ~/.bashrc +{ + echo 'source ~/.bash_prompt' + echo "alias ip='ip -c'" + echo "alias skctl='kubectl -n kube-system'" + echo "source ~/devstack openrc admin admin >/dev/null 2>/dev/null'" +} >> ~/.bashrc # 7. get my vim config git clone https://github.com/gryf/.vim ~/.vim # populate plugins -vim -c ':PlugUpdate' -c ':qa!' ${STACKUSER} +vim -c ':PlugUpdate' -c ':qa!' # showmarks is a stubborn one -mkdir ~/.vim/bundle/ShowMarks/doc ${STACKUSER} +mkdir ~/.vim/bundle/ShowMarks/doc # clone devstack git clone https://opendev.org/openstack/devstack ~/devstack