-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (61 loc) · 1.96 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
SHELL := /bin/zsh
install: set-xcode set-ohmyzsh set-zinit set-brew
sudo -v
brew update
brew bundle --file=Brewfile
install-others:
sudo -v
brew update
brew bundle --file=Brewfile_others
install-java:
sudo -v
brew update
brew bundle --file=Brewfile_java
install-rust:
sudo -v
brew update
brew bundle --file=Brewfile_rust
rustup-init
if command -v wrangler &> /dev/null; then \
echo "wrangler is already installed"; \
else \
yarn global add wrangler; \
echo 'export PATH="$$HOME/.cargo/bin:$$PATH"' >> ~/.zshrc; \
source ~/.zshrc; \
fi
set-xcode:
if xcode-select -p > /dev/null; then \
echo "Xcode command line tools already installed"; \
else \
xcode-select --install; \
fi
set-brew:
if command -v brew > /dev/null; then \
echo "Homebrew already installed"; \
else \
/bin/bash -c "$$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"; \
fi
set-ohmyzsh:
if [ -d "$$HOME/.oh-my-zsh" ]; then \
echo "Oh My Zsh is already installed."; \
else \
sh -c "$$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"; \
fi
set-zinit:
if command -v zinit > /dev/null; then \
echo "Zinit already installed"; \
else \
bash -c "$$(curl --fail --show-error --silent --location https://raw.githubusercontent.com/zdharma-continuum/zinit/HEAD/scripts/install.sh)"; \
echo 'zinit light zsh-users/zsh-completions' >> ~/.zshrc; \
echo 'zinit light zsh-users/zsh-autosuggestions' >> ~/.zshrc; \
echo 'zinit light zdharma-continuum/fast-syntax-highlighting' >> ~/.zshrc; \
echo 'zinit load zdharma-continuum/history-search-multi-word' >> ~/.zshrc; \
echo 'zinit ice depth="1"' >> ~/.zshrc; \
echo 'zinit light romkatv/powerlevel10k' >> ~/.zshrc; \
echo 'zi ice from"gh-r" as"program"' >> ~/.zshrc; \
echo 'zi light junegunn/fzf' >> ~/.zshrc; \
source ~/.zshrc; \
fi
clean:
brew bundle cleanup --force --file=Brewfile
.PHONY: install install-others set-xcode set-brew set-ohmyzsh clean