break out installation pieces and layer powerline go inside of go install

This commit is contained in:
Paul Trowbridge 2021-03-12 21:53:04 -05:00
parent 6488d20fcc
commit 804f6800d2

View File

@ -32,14 +32,14 @@ done
#----------------------------------------------------------install go and go-powerline-------------------------------------------------------------------- #----------------------------------------------------------install go and go-powerline--------------------------------------------------------------------
# if $GOPATH is null the prompt for golang install
if [ -z "$GOPATH" ] if [ -z "$GOPATH" ]
then then
while true; do while true; do
read -p "do you want to install golang and go-powerline?" yn read -p "do you want to install golang (needed for go-powerline)?" yn
case $yn in case $yn in
[Yy]* ) [Yy]* )
sudo apt-get install golang -y; sudo apt-get install golang -y;
go get -u github.com/justjanne/powerline-go;
break;; break;;
[Nn]* ) [Nn]* )
exit;; exit;;
@ -50,13 +50,13 @@ fi
#----------------------------------------------------------install go-powerline--------------------------------------------------------------------------- #----------------------------------------------------------install go-powerline---------------------------------------------------------------------------
if [ -z "$GOPATH" ] # see if this file exists, if not prompt for install
if [ ! -f ~/go/bin/powerline-go ]
then then
while true; do while true; do
read -p "do you want to install golang and go-powerline?" yn read -p "do you want to install go-powerline?" yn
case $yn in case $yn in
[Yy]* ) [Yy]* )
sudo apt-get install golang -y;
go get -u github.com/justjanne/powerline-go; go get -u github.com/justjanne/powerline-go;
break;; break;;
[Nn]* ) [Nn]* )
@ -65,12 +65,13 @@ then
esac esac
done done
fi fi
#----------------------------------------------------------install power line fonts------------------------------------------------------------------------ #----------------------------------------------------------install power line fonts------------------------------------------------------------------------
if [ ! -d ~/fonts ] if [ ! -d ~/fonts ]
then then
while true; do while true; do
read -p "do you want to install powerline fonts from https://github.com/powerline/fonts?" yn read -p "do you want to install powerline fonts from 'https://github.com/powerline/fonts' ?" yn
case $yn in case $yn in
[Yy]* ) [Yy]* )
git clone https://github.com/powerline/fonts ~/fonts; git clone https://github.com/powerline/fonts ~/fonts;
@ -90,7 +91,7 @@ fi
if [ ! -d ~/.tmux/plugins/tpm ] if [ ! -d ~/.tmux/plugins/tpm ]
then then
while true; do while true; do
read -p "do you want to install the tmux plugin manager from https://github.com/tmux-plugins/tpm" yn read -p "do you want to install the tmux plugin manager from 'https://github.com/tmux-plugins/tpm' ?" yn
case $yn in case $yn in
[Yy]* ) [Yy]* )
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm; git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm;
@ -105,14 +106,24 @@ fi
#----------------------------------------------------------see if Vundle has been cloned yet and do so----------------------------------------------------- #----------------------------------------------------------see if Vundle has been cloned yet and do so-----------------------------------------------------
if [ ! -d ~/.vim ] if [ ! -d ~/.vim/bundle ]
then then
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
while true; do while true; do
read -p "Do you want to install the vim plugins now?" yn read -p "do you want to install the Vundle plugin manager for vim from https://github.com/VundleVim/Vundle.vim.git?" yn
case $yn in case $yn in
[Yy]* ) vim +PluginInstall +qall; break;; [Yy]* )
[Nn]* ) exit;; git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
break;;
[Nn]* )
while true; do
read -p "Do you want to install the vim plugins now?" yn
case $yn in
[Yy]* ) vim +PluginInstall +qall; break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done
exit;;
* ) echo "Please answer yes or no.";; * ) echo "Please answer yes or no.";;
esac esac
done done