-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (40 loc) · 1.29 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
45
46
ifndef DESTDIR
export DESTDIR = ~
endif
export RCDIR = $(DESTDIR)/..rc
build:
@git submodule init
@git submodule update --init --recursive
install:
@chmod 400 ssh/config
@rm -rf $(RCDIR)
@ln -s $(CURDIR) $(RCDIR)
@mkdir -p $(DESTDIR)/.ssh
@mkdir -p $(DESTDIR)/.subversion
@mkdir -p $(DESTDIR)/.vim
@mkdir -p $(DESTDIR)/.config/git
@ln -sf $(CURDIR)/git/gitconfig $(DESTDIR)/.gitconfig
@ln -sf $(CURDIR)/git/attributes $(DESTDIR)/.config/git/attributes
@ln -sf $(CURDIR)/ssh/config $(DESTDIR)/.ssh
@ln -sf $(CURDIR)/subversion/config $(DESTDIR)/.subversion
@rm -rf $(DESTDIR)/.vim/bundle
@ln -sf $(CURDIR)/vim/bundle $(DESTDIR)/.vim/bundle
@ln -sf $(CURDIR)/vim/filetype.vim $(DESTDIR)/.vim/filetype.vim
@ln -sf $(CURDIR)/vim/vimrc $(DESTDIR)/.vimrc
@ln -sf $(CURDIR)/zsh/zshenv $(DESTDIR)/.zshenv
@ln -sf $(CURDIR)/zsh/zshrc $(DESTDIR)/.zshrc
test:
@echo Testing zsh/zshenv...
@zsh -n zsh/zshenv
@echo Testing zsh/zshrc...
@zsh -n zsh/zshrc
@echo Testing git/gitconfig...
@git config --list -f git/gitconfig > /dev/null
@echo Testing ssh/config...
@ssh -TF ssh/config [email protected] 2>&1 | grep -iv 'bad configuration' > /dev/null
@echo Testing subversion/config...
@svn status -q --config-dir subversion
clean:
@git clean -dxf
@git submodule deinit -f .
.PHONY: build install test clean