makefile: use symlinks.
This commit is contained in:
parent
aa5a78204f
commit
1d74e87999
15
Makefile
15
Makefile
@ -1,7 +1,6 @@
|
||||
FILES = bashrc vimrc zshrc gitconfig screenrc commonshrc \
|
||||
gnomerc gvimrc muttrc pentadactylrc mailcap latexmkrc ctags \
|
||||
i3/config i3status.conf
|
||||
FILES2 = msmtprc
|
||||
i3/config i3status.conf msmtprc spacemacs emacs.d
|
||||
|
||||
.PHONY: install clean check
|
||||
|
||||
@ -25,14 +24,12 @@ install-vim-plug:
|
||||
|
||||
else
|
||||
|
||||
install-conf: $(FILES) $(FILES2)
|
||||
for i in $(FILES); do install -Dm0644 $$i ~/.$$i; done
|
||||
for i in $(FILES2); do install -Dm0600 $$i ~/.$$i; done
|
||||
ln -sf $(PWD)/spacemacs ~/.spacemacs
|
||||
test -d ~/.emacs.d || ln -s $(PWD)/emacs.d ~/.emacs.d
|
||||
.PHONY: install-conf
|
||||
|
||||
check: $(FILES)
|
||||
for i in $(FILES); do diff -u ~/.$$i $$i; done
|
||||
install-conf: $(foreach i,$(FILES),install-file/$(i))
|
||||
|
||||
install-file/%: %
|
||||
mkdir -p ~/.$(dir $<) && ln -Trsf $< ~/.$<
|
||||
|
||||
VIM_DIR = $(HOME)/.vim
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user