-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
105 lines (81 loc) · 2.61 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
GIT_NAME = Qingshan
GIT_MAIL = qs@qingshan.dev
OS := $(shell uname -s | tr A-Z a-z)
.PHONY: install
install: setup tools packages
.PHONY: setup
setup: $(OS)
.PHONY: darwin
darwin:
sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
.PHONY: linux
linux:
@if [ -f /etc/redhat-release ]; then sh ./linux/redhat/setup.sh; fi
@if [ -f /etc/arch-release ]; then sh ./linux/arch/setup.sh; fi
@if [ -f /etc/debian_version ]; then sh ./linux/debian/setup.sh; fi
touch ~/.hushlogin
bash -c 'rm -rf /usr/local/go && curl -sL https://go.dev/dl/go1.21.3.linux-amd64.tar.gz | sudo tar -C /usr/local -xz'
bash -c 'sh <(curl https://sh.rustup.rs -sSf) -y'
.PHONY: packages
packages: python-packages node-packages rust-packages fish-packages
.PHONY: python-packages
python-packages:
.PHONY: node-packages
node-packages:
.PHONY: go-packages
go-packages:
go install golang.org/x/tools/gopls@latest
go install github.com/go-delve/delve/cmd/dlv@latest
go install golang.org/x/tools/cmd/goimports@latest
.PHONY: rust-packages
rust-packages:
rustup component add rust-src
rustup component add rust-analyzer
.PHONY: fish-packages
fish-packages:
fish -c "curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher"
fish -c "fisher install patrickf1/fzf.fish"
fish -c "fisher install jorgebucaran/autopair.fish"
.PHONY: racket-packages
racket-packages:
raco pkg install --auto racket-langserver
raco pkg install --auto fmt
raco pkg install --auto drracket
.PHONY: tools
tools: fish bash zsh vim alacritty helix tmux git dirs
.PHONY: profile
profile:
ln -vsf .dotfiles/.profile ${HOME}/.profile
.PHONY: fish
fish: profile
mkdir -p ${HOME}/.config/fish
ln -vsf ../../.dotfiles/fish/config.fish ${HOME}/.config/fish/config.fish
.PHONY: bash
bash: profile
ln -vsf .dotfiles/.bashrc ${HOME}/.bashrc
.PHONY: zsh
zsh: profile
ln -vsf .dotfiles/.zshrc ${HOME}/.zshrc
.PHONY: vim
vim:
ln -vsf .dotfiles/.vimrc ${HOME}/.vimrc
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
vim +PlugInstall +qall
.PHONY: helix
helix:
ln -vsf ../.dotfiles/helix ${HOME}/.config/helix
ln -vsf ../.dotfiles/.dprint.json ${HOME}/.dprint.json
.PHONY: alacritty
alacritty:
ln -vsf ../.dotfiles/alacritty ${HOME}/.config/alacritty
.PHONY: tmux
tmux:
ln -vsf .dotfiles/.tmux.conf ${HOME}/.tmux.conf
.PHONY: git
git:
git config --global user.name $(GIT_NAME)
git config --global user.email $(GIT_MAIL)
.PHONY: dirs
dirs:
@test -d ~/.bin || mkdir -v ~/.bin
.DEFAULT_GOAL := install