-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
121 lines (98 loc) · 3.15 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
SHELL = /bin/sh
.DEFAULT_GOAL := test
.PHONY: install
install: bash gpg i3 urxvt tmux xinit git ssh vim arch ranger
.PHONY: bash
bash:
@for file in $(shell find "$(CURDIR)/bash" -name ".*"); do \
f=$$(basename $$file); \
ln -sfn $$file $(HOME)/$$f; \
done;
@unset file;
.PHONY: gpg
gpg:
@mkdir -p $(HOME)/.gnupg
@for file in $(shell find "$(CURDIR)/gnupg" -name "*.conf"); do \
f=$$(basename $$file); \
ln -sfn $$file $(HOME)/.gnupg/$$f; \
done;
@unset file;
.PHONY: i3
i3:
@mkdir -p $(HOME)/.config/i3/
@for file in $(shell find "$(CURDIR)/i3" -name "*conf*"); do \
f=$$(basename $$file); \
ln -sfn $$file $(HOME)/.config/i3/$$f; \
done;
@unset file;
@mkdir -p ~/pictures/screenshots/
.PHONY: urxvt
urxvt:
@ln -sfn $(CURDIR)/urxvt/.Xdefaults $(HOME)/.Xdefaults
@mkdir -p /usr/lib/urxvt/perl/
@sudo ln -sfn $(CURDIR)/urxvt/ext/clipboard /usr/lib/urxvt/perl/clipboard
@sudo ln -sfn $(CURDIR)/urxvt/ext/urxvt-font-size/font-size /usr/lib/urxvt/perl/font-size
.PHONY: alacritty
alacritty:
@ln -sfn "$(CURDIR)/alacritty/.alacritty.yml" "$(HOME)/.alacritty.yml"
.PHONY: tmux
tmux:
@ln -sfn $(CURDIR)/tmux/.tmux.conf $(HOME)/.tmux.conf
.PHONY: xinit
xinit:
@ln -sfn $(CURDIR)/.xinitrc $(HOME)/.xinitrc
.PHONY: git
git:
@ln -sfn $(CURDIR)/git/.gitconfig $(HOME)/.gitconfig
@ln -sfn "${CURDIR}/git/template" "${HOME}/.git_template"
@ln -sfn "${CURDIR}/git/.gitignore" "${HOME}/.gitignore"
.PHONY: ssh
ssh:
@mkdir -p $(HOME)/.ssh
@ln -sfn $(CURDIR)/ssh/config $(HOME)/.ssh/config
@ln -sfn $(CURDIR)/ssh/ssh-find-agent/ssh-find-agent.sh $(HOME)/.ssh-find-agent.sh
.PHONY: vim
vim:
@ln -sfn $(CURDIR)/vim/.vimrc $(HOME)/.vimrc
@mkdir -p $(HOME)/.vim/backup
@mkdir -p $(HOME)/.vim/bundle
@mkdir -p $(HOME)/.vim/swapfiles
@mkdir -p $(HOME)/.vim/undodir
@mkdir -p $(HOME)/.vim/colors
@ln -sfn $(CURDIR)/vim/.vim/colors/wombat.vim $(HOME)/.vim/colors/wombat.vim
.PHONY: arch
arch:
@sudo ln -sfn $(CURDIR)/arch/hooks/update_pkg_list.hook \
/usr/share/libalpm/hooks/update_pkg_list.hook
@# Parcimonie GPG key refreshing
@sudo ln -sfn $(CURDIR)/arch/parcimonie/s.conf \
/etc/parcimonie.sh.d/s.conf
@sudo ln -sfn $(CURDIR)/arch/parcimonie/user.conf \
/etc/systemd/system/parcimonie.sh@s.service.d/user.conf
@mkdir -p $(HOME)/.local/tmp/parcimonie
# systemctl daemon-reload
# systemctl cat parcimonie.sh@julian.service
# systemctl enable parcimonie.sh@julian.service
# systemctl start parcimonie.sh@julian.service
# systemctl status parcimonie.sh@julian.service
.PHONY: ranger
ranger:
@mkdir -p $(HOME)/.config/ranger
@ln -sfn $(CURDIR)/ranger/rc.conf $(HOME)/.config/ranger/
@ln -sfn $(CURDIR)/ranger/rifle $(HOME)/.config/ranger/
.PHONY: test
test: shellcheck
# if this session isn't interactive, then we don't want to allocate a
# TTY, which would fail, but if it is interactive, we do want to attach
# so that the user can send e.g. ^C through.
INTERACTIVE := $(shell [ -t 0 ] && echo 1 || echo 0)
ifeq ($(INTERACTIVE), 1)
DOCKER_FLAGS += -t
endif
.PHONY: shellcheck
shellcheck:
docker run --rm -i $(DOCKER_FLAGS) \
--name dotfiles_shellcheck \
-v $(CURDIR):/usr/src:ro \
--workdir /usr/src \
szybia/shellcheck ./test.sh