-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (32 loc) · 1.24 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
EXCLUDE := README.md Makefile Brewfile vscode-settings.json vscode-keybindings.json
FILES := $(shell ls)
SOURCES := $(filter-out $(EXCLUDE),$(FILES))
DOTFILES := $(patsubst %, ${HOME}/.%, $(SOURCES))
VS_CODE_SETTINGS := ${HOME}/Library/Application\ Support/Code/User/settings.json
VS_CODE_KEYBINDINGS := ${HOME}/Library/Application\ Support/Code/User/keybindings.json
VIM_PLUG := ${PWD}/nvim/autoload/plug.vim
.PHONY: update vim-install
install: all
all: $(DOTFILES) ${HOME}/.config/nvim vim-install ${HOME}/.config/kitty
$(DOTFILES): $(addprefix ${HOME}/., %) : ${PWD}/%
ln -s $< $@
${HOME}/.config/nvim: ${PWD}/nvim
ln -s $< $@
${HOME}/.config/kitty: ${PWD}/kitty
ln -s $< $@
$(VS_CODE_SETTINGS):
ln -s $(PWD)/vscode-settings.json "$@"
$(VS_CODE_KEYBINDINGS):
ln -s $(PWD)/vscode-keybindings.json "$@"
$(VIM_PLUG):
@curl -sfLo $@ --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
${HOME}/.gituser:
@read -p "Enter Your Full Name for Git Commits: " name; \
read -p "Enter Your Email for Git Commits: " email; \
git config -f ~/.gituser user.name "$$name"; \
git config -f ~/.gituser user.email "$$email"
vim-install: $(VIM_PLUG)
@echo "Installing vim plugins"
@nvim +PlugInstall +qa
update: all
@git pull