nvim/Makefile
Evie Litherland-Smith 7351508b12 Add installer scripts and Makefile
Scripts to install neovim, direnv and FiraCode nerd fonts if missing
Make file handles calling installers, can clean up after as well
2023-05-16 10:11:44 +01:00

17 lines
706 B
Makefile

CONFIG_DIR := $(if $(XDG_CONFIG_HOME), $(XDG_CONFIG_HOME), $(HOME)/.config)
BIN_DIR := $(HOME)/.local/bin
.PHONY: default clean
default: $(CONFIG_DIR) $(BIN_DIR)
fc-list | grep -iE "(fira.*code)*(nerd.*font)" > /dev/null || ./installers/firacode.sh && fc-cache
command -v nvim > /dev/null || ./installers/nvim.sh
command -v direnv > /dev/null || bin_path="$(BIN_DIR)" ./installers/direnv.sh
clean:
[ -e $(HOME)/.fonts/FiraCode ] && rm -rf $(HOME)/.fonts/FiraCode
[ -e $(HOME)/.local/share/nvim ] && rm -rf $(HOME)/.local/share/nvim
[ -e $(HOME)/.local/state/nvim ] && rm -rf $(HOME)/.local/state/nvim
[ -e $(BIN_DIR)/nvim ] && rm $(BIN_DIR)/nvim
[ -e $(BIN_DIR)/direnv ] && rm $(BIN_DIR)/direnv