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--------------------------------------------------------------------
# if $GOPATH is null the prompt for golang install
if [ -z "$GOPATH" ]
then
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
[Yy]* )
sudo apt-get install golang -y;
go get -u github.com/justjanne/powerline-go;
break;;
[Nn]* )
exit;;
@ -50,13 +50,13 @@ fi
#----------------------------------------------------------install go-powerline---------------------------------------------------------------------------
if [ -z "$GOPATH" ]
# see if this file exists, if not prompt for install
if [ ! -f ~/go/bin/powerline-go ]
then
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
[Yy]* )
sudo apt-get install golang -y;
go get -u github.com/justjanne/powerline-go;
break;;
[Nn]* )
@ -65,12 +65,13 @@ then
esac
done
fi
#----------------------------------------------------------install power line fonts------------------------------------------------------------------------
if [ ! -d ~/fonts ]
then
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
[Yy]* )
git clone https://github.com/powerline/fonts ~/fonts;
@ -90,7 +91,7 @@ fi
if [ ! -d ~/.tmux/plugins/tpm ]
then
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
[Yy]* )
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-----------------------------------------------------
if [ ! -d ~/.vim ]
if [ ! -d ~/.vim/bundle ]
then
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
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
[Yy]* ) vim +PluginInstall +qall; break;;
[Nn]* ) exit;;
[Yy]* )
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.";;
esac
done