-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (53 loc) · 1.47 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
DOTPATH := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
CANDIDATES := $(wildcard .??*)
EXCLUSIONS := .DS_Store .git .gitmodules .travis.yml .ssh_config
DOTFILES := $(filter-out $(EXCLUSIONS), $(CANDIDATES))
export GO111MODULE:=on
## install dotfiles
install:
DOTPATH=$(DOTPATH) bash $(DOTPATH)/install
## update dotfiles
update:
DOTPATH=$(DOTPATH) bash $(DOTPATH)/update
## pull repo and submodule
pull:
git pull origin master
# git submodule init
# git submodule update
# git submodule foreach git pull origin master
## bootstrap
bootstrap:
@bash $(DOTPATH)/etc/util/osx_bootstrap.sh
## exec provision
pkg:
$(foreach val, $(wildcard ./etc/*.sh), DOTPATH=$(DOTPATH) bash $(DOTPATH)/$(val);)
## deploy dotfiles
deploy:
$(foreach val, $(DOTFILES), ln -sfnv $(abspath $(val)) $(HOME)/$(val);)
cp -f .ssh_config $(HOME)/.ssh/config;
## dep resolved dependencies after install
dep:
@echo "NOOP"
## install go dependencies
godep:
GO111MODULE=on go get golang.org/x/tools/gopls@latest
go get github.com/Songmu/make2help/cmd/make2help
## rust dep
rustdep:
rustup component add rls
rustup component add rust-analysis
rustup component add rust-src
## iterm2
iterm_shell_integration:
curl -L https://iterm2.com/shell_integration/zsh \
-o ~/.iterm2_shell_integration.zsh
## install npm dep
npmdep:
npm install -g typescript-language-server
## show help
help:
@make2help $(MAKEFILE_LIST)
## test
test:
@echo $(DOTFILES)
.PHONY: install update pull pkg deploy dep godep help