-
Notifications
You must be signed in to change notification settings - Fork 0
/
boostrap.sh
118 lines (86 loc) · 2.28 KB
/
boostrap.sh
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
#!/bin/bash
# jiangtao's shell for initing on macosx
# keep the brew which was installed successfully
# brew update
# install tools
tools=(
ripgrep
git
vim
autojump
tree
nginx
wget
gifsicle # gif tools for unix
mkcert # mkcert for localhost
bat # cat with line number
fd # better find command
jq
koekeishiya/formulae/skhd
koekeishiya/formulae/yabai
thefuck # fuck the wrong spell
)
brew install ${tools[@]}
# Install nvm and node
echo "Installing fnm..."
brew install fnm
echo 18.16.1 >> $HOME/.node-version
source $HOME/.zshrc
modules=(
# webpack
yarn
pnpm
gulp
tldr
project-next-cli
tree
tig
)
echo "installing node modules..."
npm i -g ${modules[@]}
# oh my zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# add suggestion plugin y5
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
# add zsh plugins
echo "plugins=(git zsh-autosuggestions)" >> $HOME/.zshrc
# clone files and conf some lns
git clone https://github.com/jiangtao/mydotfiles.git ~/places/personal/mydotfiles
ln -sf ~/places/personal/mydotfiles/ln/.gitignore_global ~/.gitignore_global
ln -sf ~/places/personal/mydotfiles/ln/.zshrc ~/.zshrc
ln -sf ~/places/personal/mydotfiles/ln/.npmrc ~/.npmrc
ln -sf ~/places/personal/mydotfiles/ln/.yarnrc ~/.yarnrc
ln -sf ~/places/personal/mydotfiles/ln/.skhdrc ~/.skhdrc
ln -sf ~/places/personal/mydotfiles/ln/.yabairc ~/.yabairc
ln -sf ~/places/personal/mydotfiles/ln/.npmrc ~/.npmrc
# 启动 skhd
skhd --start-service
# 启动yabai
# ln -sf ~/places/personal/mydotfiles/ln/.tmux.conf ~/.tmux.conf
# tmux source-file ~/.tmux.conf
# configure rust env
if test ! $(which rustup); then
echo "Initing Rust Env..."
/bin/bash -c "$(curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh)"
echo source $HOME/.cargo/env >> ~/.zshrc
fi
source $HOME/.cargo/env
# configure vim
# bash vim.sh
# Install Brew Cask
echo "Installing brew cask..."
# Apps
# https://caskroom.github.io/search
apps=(
aText
sourcetree
imageoptim
beyond-compare
drawio
kap
)
# Install apps to /Applications
echo "installing apps..."
# latest brew use option cask install app
brew install --cask --appdir="/Applications" ${apps[@]}
echo "Done."