#!/bin/bash # to be in script folder cd $(dirname $0) CURRENT_DIR=$(pwd) echo "installing vimrc" if [ -f ~/.vimrc ] then echo "backuping existing ~/.vimrc" cp ~/.vimrc ~/.vimrc.bkp rm ~/.vimrc echo "Linking ${CURRENT_DIR}/vim/.vimrc" ln -s ${CURRENT_DIR}/vim/.vimrc ~/.vimrc fi if [ ! -f ~/.vim/autoload/plug.vim ] then echo "installing vim-plug" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim vim -c PlugInstall else echo "vim-plug already installed" fi