-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
32 lines (26 loc) · 1.01 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
VIM_DIR ?= ${HOME}/.vim
plug.vim := $(VIM_DIR)/autoload/plug.vim
git-prompt.sh := ${HOME}/.git-prompt.sh
git-completion.bash := ${HOME}/.git-completion.bash
.PHONY: all
all: dotfiles $(plug.vim) $(git-prompt.sh) $(git-completion.bash)
.PHONY: dotfiles
dotfiles:
for file in $(shell git ls-files --exclude-standard $(CURDIR) | \
xargs -I {} find {} -name '.*' -not -name '.gitignore'); do \
f=$$(basename $$file); \
ln -sfn $(CURDIR)/$$file $(HOME)/$$f; \
done; \
[ -f $(CURDIR)/.extra ] && ln -sfn $(CURDIR)/.extra $(HOME)/.extra; \
ln -sfn $(CURDIR)/.vim $(HOME)/.vim; \
mkdir -p $(HOME)/.config; \
ln -sfn $(CURDIR)/.config/nvim $(HOME)/.config/nvim;
$(plug.vim):
curl -fLo $@ --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
$(git-prompt.sh):
curl -fLo $@ \
https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh
$(git-completion.bash):
curl -fLo $@ \
https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash