vim-settings/Makefile

43 lines
827 B
Makefile
Raw Normal View History

2019-10-24 19:35:49 +00:00
PRE_COMMIT_ENV ?= .pre_commit_env
PRE_COMMIT_ENV_BIN ?= $(PRE_COMMIT_ENV)/bin
2017-11-14 03:28:07 +00:00
.PHONY: default
default: check
2015-03-26 17:36:36 +00:00
2017-11-14 03:28:07 +00:00
.PHONY: install
2015-03-26 17:36:36 +00:00
install:
2015-03-27 00:45:03 +00:00
sh ./vim-sync-append.sh
2017-11-14 03:28:07 +00:00
.PHONY: update
update:
sh ./update-plugins.sh
.PHONY: uninstall
2015-03-27 00:45:03 +00:00
uninstall:
rm ~/.vimrc
rm ~/.nvimrc
rm -fr ~/.vim
rm -fr ~/.nvim
2015-11-18 05:42:01 +00:00
rm -fr ~/.config/nvim
2015-03-26 17:36:36 +00:00
2017-11-14 03:28:07 +00:00
.PHONY: clean
2015-03-26 17:36:36 +00:00
clean:
rm -fr ./vim/plugged
rm -fr ./vim/autoload/plug.vim
2019-10-24 19:35:49 +00:00
# Installs pre-commit hooks
$(PRE_COMMIT_ENV):
virtualenv $(PRE_COMMIT_ENV)
$(PRE_COMMIT_ENV_BIN)/pre-commit: $(PRE_COMMIT_ENV)
$(PRE_COMMIT_ENV_BIN)/pip install pre-commit
.PHONY: install-hooks
install-hooks: $(PRE_COMMIT_ENV_BIN)/pre-commit
$(PRE_COMMIT_ENV_BIN)/pre-commit install-hooks
# Checks files for encryption
.PHONY: check
check: $(PRE_COMMIT_ENV_BIN)/pre-commit
$(PRE_COMMIT_ENV_BIN)/pre-commit run --all-files