-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
57 lines (43 loc) · 1.76 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
DOTFILES_EXCLUDES := .DS_Store .git .gitmodules
DOTFILES_TARGET := $(wildcard .??*)
DOTFILES_DIR := $(PWD)
DOTFILES_FILES := $(filter-out $(DOTFILES_EXCLUDES), $(DOTFILES_TARGET))
CONFIG_DIR := .config/
CONFIG_TARGET := $(addprefix $(CONFIG_DIR), dein nvim terminator tmux alacritty zsh efm-langserver starship.toml)
deploy: install-zinit
@$(foreach val, $(DOTFILES_FILES), ln -sfnv $(abspath $(val)) $(HOME)/$(val);)
@$(foreach val, $(CONFIG_TARGET), ln -sfnv $(abspath $(val)) $(HOME)/$(val);)
install-brew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
install-zinit:
where zinit || sh -c "$$(curl -fsSL https://git.io/zinit-install)"
install: install-brew install-go
cat pkg/brew_tap.txt | xargs -n1 brew tap
cat pkg/brew.txt | xargs brew install || true
cat pkg/cask.txt | xargs brew install --cask
cat pkg/npm.txt | xargs npm i -g
install-go:
cat pkg/gopkg.txt | xargs -n1 go install
update:
brew tap > pkg/brew_tap.txt
brew leaves > pkg/brew.txt
brew list --cask > pkg/cask.txt
bash ./hack/goinstall.sh show > pkg/gopkg.txt
zsh ./hack/update-local.zsh
npm list -g -j | jq -r '.dependencies | keys | .[]' > pkg/npm.txt
gopkg.update:
./hack/goinstall.sh show | xargs -n1 go install
test.init:
brew install coreutils
gsplit -n 3 -d -a1 pkg/brew.txt brew-
test.tap: install-brew
cat pkg/brew_tap.txt | xargs -t -n1 brew tap
test.brew.0: install-brew test.init test.tap
cat brew-0 | xargs -t brew install || true
test.brew.1: install-brew test.init test.tap
cat brew-1 | xargs -t brew install || true
test.brew.2: install-brew test.init test.tap
cat brew-2 | xargs -t brew install || true
test.cask: install-brew test.tap
cat pkg/cask.txt | xargs -t brew install --cask
test.deploy: deploy