vim-plug install and fixes
This commit is contained in:
parent
5d037ce298
commit
af112e0eb0
15
install.sh
15
install.sh
@ -1,6 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
# Author: Ibrahim Mkusa
|
||||||
# Author : Ibrahim Mkusa
|
|
||||||
# Description: installs and sets up core environment for my dev work on servers
|
# Description: installs and sets up core environment for my dev work on servers
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
@ -24,21 +23,33 @@ if [[ -f /etc/os-release ]]; then
|
|||||||
package_manager=dnf
|
package_manager=dnf
|
||||||
vim="vim-enhanced"
|
vim="vim-enhanced"
|
||||||
ansible="ansible-core"
|
ansible="ansible-core"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Running on best-guess"
|
||||||
|
package_manager=apt
|
||||||
|
vim="vim-nox"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
echo "You are running an unrecognized family of os. Quitting..."
|
echo "You are running an unrecognized family of os. Quitting..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# could have used a case, but i prefer the if statement
|
# could have used a case, but i prefer the if statement
|
||||||
if [[ -z "$1" ]]; then
|
if [[ -z "$1" ]]; then
|
||||||
echo "Installing packages"
|
echo "Installing packages"
|
||||||
sudo "$package_manager" install -y "$vim" git stow curl ranger tmux
|
sudo "$package_manager" install -y "$vim" git stow curl ranger tmux
|
||||||
|
# install vim-plug
|
||||||
|
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
|
||||||
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
|
||||||
# backup current configs
|
# backup current configs
|
||||||
[[ -f ~/.bashrc ]] && mv ~/.bashrc ~/.bashrc.bak || echo "bashrc ~exists"
|
[[ -f ~/.bashrc ]] && mv ~/.bashrc ~/.bashrc.bak || echo "bashrc ~exists"
|
||||||
[[ -f ~/.bash_profile ]] && mv ~/.bash_profile ~/.bash_profile.bak || echo ".bash_profile ~exists"
|
[[ -f ~/.bash_profile ]] && mv ~/.bash_profile ~/.bash_profile.bak || echo ".bash_profile ~exists"
|
||||||
# use gnu stow to symlink config files to home directory
|
# use gnu stow to symlink config files to home directory
|
||||||
stow bash ranger shellenv tmux vim
|
stow bash ranger shellenv tmux vim
|
||||||
|
vim +PlugInstall +qall
|
||||||
elif [[ undo = "$1" ]]; then
|
elif [[ undo = "$1" ]]; then
|
||||||
echo "undoing"
|
echo "undoing"
|
||||||
stow -D bash git ranger shellenv tmux vim
|
stow -D bash git ranger shellenv tmux vim
|
||||||
|
Loading…
x
Reference in New Issue
Block a user