2023-05-16 10:11:44 +01:00
|
|
|
BIN_DIR := $(HOME)/.local/bin
|
2023-05-16 10:24:39 +01:00
|
|
|
FONTS_DIR := $(HOME)/.fonts
|
2023-05-16 10:11:44 +01:00
|
|
|
|
2023-06-13 08:28:09 +01:00
|
|
|
.PHONY: default clean nvim
|
2023-05-16 10:11:44 +01:00
|
|
|
|
2023-06-17 11:05:46 +01:00
|
|
|
default:
|
2023-06-13 08:28:09 +01:00
|
|
|
command -v nvim > /dev/null || make nvim
|
|
|
|
|
2023-05-16 10:11:44 +01:00
|
|
|
clean:
|
2023-05-31 20:28:33 +01:00
|
|
|
-rm -rf $(HOME)/.local/share/nvim
|
|
|
|
-rm -rf $(HOME)/.local/state/nvim
|
2023-06-09 11:38:22 +01:00
|
|
|
-rm -rf $(HOME)/.cache/nvim
|
2023-05-31 20:28:33 +01:00
|
|
|
-rm $(BIN_DIR)/nvim
|
|
|
|
-rm -rf $(FONTS_DIR)/FiraCode
|
2023-05-16 10:24:39 +01:00
|
|
|
|
2023-06-17 11:05:46 +01:00
|
|
|
nvim: $(BIN_DIR)/nvim $(FONTS_DIR)/FiraCode
|
2023-06-13 08:28:09 +01:00
|
|
|
|
|
|
|
$(BIN_DIR)/nvim:
|
2023-06-12 18:59:08 +01:00
|
|
|
curl -sSLO https://github.com/neovim/neovim/releases/download/stable/nvim.appimage
|
|
|
|
curl -sSLO https://github.com/neovim/neovim/releases/download/stable/nvim.appimage.sha256sum
|
2023-06-13 08:28:09 +01:00
|
|
|
sha256sum -c nvim.appimage.sha256sum || rm nvim.appimage nvim.appimage.sha256sum
|
|
|
|
sha256sum -c nvim.appimage.sha256sum || exit 1
|
2023-06-12 18:59:08 +01:00
|
|
|
rm nvim.appimage.sha256sum
|
|
|
|
chmod a+x nvim.appimage
|
2023-06-13 08:28:09 +01:00
|
|
|
mv nvim.appimage $(BIN_DIR)/nvim
|
2023-06-12 18:59:08 +01:00
|
|
|
|
2023-06-13 08:28:09 +01:00
|
|
|
$(FONTS_DIR)/FiraCode:
|
2023-06-12 18:59:08 +01:00
|
|
|
fc-list | grep -iE "(fira.*code)*(nerd.*font)" > /dev/null && exit 0
|
|
|
|
mkdir -p $(FONTS_DIR) && cd $(FONTS_DIR)
|
|
|
|
curl -sSLO https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.0/FiraCode.zip
|
|
|
|
unzip FiraCode.zip -d FiraCode
|
|
|
|
rm FiraCode.zip
|
2023-05-16 10:24:39 +01:00
|
|
|
|
|
|
|
$(BIN_DIR) $(FONTS_DIR):
|
|
|
|
mkdir -p $@
|