-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
126 lines (92 loc) · 2.72 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
121
122
123
124
125
126
# Makefile for dotfile configs
RED := $(shell tput setaf 1)
NOCOLOR := $(shell tput sgr0)
.PHONY: \
all docs brew \
base cli gui \
cargo git \
nvim poetry tmux uv zsh
all: clean base docs
# =========================
brew:
$(PWD)/brew/bin/setup.sh
brew-base:
brew bundle --verbose --no-lock --file=$(PWD)/brew/config.d/base/Brewfile
brew-optional:
brew bundle --verbose --no-lock --file=$(PWD)/brew/config.d/optional/Brewfile
brew-gui:
brew bundle --verbose --no-lock --file=$(PWD)/brew/config.d/gui/Brewfile
krew-base:
kubectl krew install open-svc oidc-login ns images ctx hns stern neat
# =========================
base: cargo git tmux zsh
cargo: cargo_clean
$(PWD)/cargo/bin/setup.sh
git: git_clean
$(PWD)/git/bin/setup.sh
nvim: nvim_clean
$(PWD)/nvim/bin/setup.sh
poetry: poetry_clean
$(PWD)/poetry/bin/setup.sh
rye: rye_clean
curl -sSf https://rye-up.com/get | bash
sheldon: sheldon_clean
$(PWD)/sheldon/bin/setup.sh
tmux: tmux_clean
$(PWD)/tmux/bin/setup.sh
uv: uv_clean
curl -LsSf https://astral.sh/uv/install.sh | sh
wezterm: wezterm_clean
$(PWD)/wezterm/bin/setup.sh
zsh: zsh_clean
$(PWD)/zsh/bin/setup.sh
# =========================
clean: \
cargo_clean \
git_clean nvim_clean poetry_clean \
tmux_clean zsh_clean
cargo_clean:
rm -rf $(HOME)/.cargo/config.toml
git_clean:
rm -rf $(HOME)/.config/git/config
rm -rf $(HOME)/.config/git/ignore
nvim_clean:
rm -rf $(HOME)/.vimrc
rm -rf $(HOME)/.vim
rm -rf $(HOME)/.config/nvim
poetry_clean:
rm -rf $(HOME)/.config/pypoetry
rm -rf $(HOME)/Library/Application\ Support/pypoetry
rye_clean:
./rye/bin/clean.sh
sheldon_clean:
rm -rf $(HOME)/.config/sheldon
tmux_clean:
rm -rf $(HOME)/.tmux.conf
uv_clean:
rm -rf $(HOME)/.local/bin/uv $(HOME)/.local/bin/uvx
wezterm_clean:
rm -rf $(HOME)/.wezterm.lua
zsh_clean:
rm -rf $(HOME)/.zshrc
# =========================
docs:
@echo ""
@echo "### Finish installing dotfiles!"
@echo "Please run $(RED)source $$HOME/.zshrc$(NOCOLOR) on zsh to enable configures."
@echo "- If you want to use nvim with extensions, please run $(RED)make nvim$(NOCOLOR) (which needs pyenv)."
@echo "- If you want to install pyenv using brew, please read the Python section below."
@echo ""
@echo "---"
@echo ""
@echo "### Packages"
@echo "- If you want to use linuxbrew/homebrew, please run $(RED)make brew-cui$(NOCOLOR)."
@echo "- Please run $(RED)make brew$(NOCOLOR) before if you have not installed brew yet"
@echo "- Additionally, $(RED)make brew-optional$(NOCOLOR) installs optional packages"
@echo ""
@echo "---"
@echo ""
@echo "### Python"
@echo "- After $(RED)make brew, make brew-cui, source $$HOME/.zshrc$(NOCOLOR),"
@echo " you can run $(RED)make nvim$(NOCOLOR) to install Python and the nvim library"
@echo ""