-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (30 loc) · 1.08 KB
/
Makefile
File metadata and controls
43 lines (30 loc) · 1.08 KB
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
HOSTNAME=$(shell hostname)
TARGET_OS=$(shell ./scripts/detect-target-os.sh)
setup: link-git-hooks link-dotfiles install-packages change-login-shell
.PHONY: setup link-git-hooks link-dotfiles install-packages update-packages clean-packages change-login-shell
.PHONY: dump-brewfile diff-brewfile clean-brewfile files/Brewfile.$(HOSTNAME)
.PHONY: shellcheck
link-git-hooks: .git/hooks/post-merge
.git/hooks/post-merge:
mkdir -p $$(dirname $@)
ln -s -f $(PWD)/scripts/post-merge $$(dirname $@)
link-dotfiles:
@scripts/link-dotfiles.sh
install-packages:
@scripts/$(TARGET_OS)/install-packages.sh
update-packages:
@scripts/$(TARGET_OS)/update-packages.sh
clean-packages:
@scripts/$(TARGET_OS)/clean-packages.sh
change-login-shell:
@scripts/change-login-shell.sh
dump-brewfile: files/Brewfile.$(HOSTNAME)
diff-brewfile: files/Brewfile.$(HOSTNAME)
diff --unified files/Brewfile $< || exit 0
clean-brewfile:
@rm -v files/Brewfile.$(HOSTNAME).*
files/Brewfile.$(HOSTNAME):
-[ -f $@ ] && ./bin/rotate-suffix $@
brew bundle dump --file=$@
shellcheck:
shellcheck scripts/*.sh scripts/*/*.sh