Updated Makefile to remove old symlink or directories

This commit is contained in:
Chuck Hawley
2017-10-23 16:24:57 -04:00
parent ed4f245358
commit 228d3c31fd

View File

@@ -1,14 +1,18 @@
all: softlinks vimrepo: softlinks
@echo "-----------------------------------------------------------" @echo "-----------------------------------------------------------"
@echo "Vim and environment" @echo "Vim and environment"
@echo "-----------------------------------------------------------" @echo "-----------------------------------------------------------"
@echo "Open vim and type :PlugInstall to install extension manager" @echo "Open vim and type :PlugInstall to install extension manager"
softlinks: dependencies softlinks: apps
@test -L ${HOME}/.vim || ln -s ${PWD}/.vim ${HOME}/.vim @test -L ${HOME}/.vim && unlink ${HOME}/.vim || true
@test -L ${HOME}/.vimrc || ln -s ${PWD}/.vimrc ${HOME}/.vimrc @(test -d ${HOME}/.vim && mv ${HOME}/.vim ${HOME}/.vim_old) || true
@ln -vsf ${PWD}/.vim ${HOME}/.vim
@(test -L ${HOME}/.vimrc && unlink ${HOME}/.vimrc) || true
@(test -f ${HOME}/.vimrc && mv ${HOME}/.vimrc ${HOME}/.vimrc_old) || true
@ln -vsf ${PWD}/.vimrc ${HOME}/.vimrc
dependencies: apps:
@sudo apt install vim @sudo apt install vim