-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-system.sh
executable file
·152 lines (128 loc) · 2.85 KB
/
setup-system.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#!/usr/bin/env bash
CASK_INSTALLS=(
NetNewsWire
google-chrome
spotify
docker
vlc
tor-browser
notion
obs
amethyst
intellij-idea-ce
dropbox
iterm2
shiftit
android-file-transfer
calibre
anki
min
anaconda
)
BREW_INSTALLS=(
nvm
yarn
npm
wget
rg
tmux
mvn
redis
cask
ctags
bluetoothconnector
glow
python
jupyter
coreutils
ffmpeg
git-credential-manager
yq
openjdk@21
)
PIP_INSTALLS=(
pylint
black
)
BREW_TAPS=(
adoptopenjdk/openjdk
)
install_tmux_plugin_manager() {
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
}
install_homebrew() {
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/shane/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
}
install_neobundle() {
curl https://raw.githubusercontent.com/Shougo/neobundle.vim/master/bin/install.sh > install.sh
sh ./install.sh
rm install.sh
}
install_diff_so_fancy() {
brew install diff-so-fancy
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
git config --global interactive.diffFilter "diff-so-fancy --patch"
}
install_oh_my_zsh() {
# sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# mv .oh-my-zsh .bin/
ln -s ~/.bin/dotfiles/shane.zsh-theme ~/.bin/.oh-my-zsh/themes/shane.zsh-theme
}
install_lts_node() {
nvm install --lts
}
brewInstall() { if brew ls --versions "$1"; then brew upgrade "$1"; else brew install "$1"; fi }
brewCaskInstall() { if brew ls --cask --versions "$1"; then brew upgrade --cask "$1"; else brew install --cask "$1"; fi }
install_with_cask() {
for APP in ${CASK_INSTALLS[@]}; do
brewCaskInstall $APP
done
}
brew_tap() {
for APP in ${BREW_TAPS[@]}; do
brew tap $APP
done
}
install_with_brew() {
for APP in ${BREW_INSTALLS[@]}; do
brewInstall $APP
done
}
install_with_pip() {
for APP in ${PIP_INSTALLS[@]}; do
pip install --upgrade $APP
done
}
install_aws_cli() {
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
rm AWSCLIV2.pkg
}
install_aliases() {
ln -s ~/.bin/dotfiles/.gitconfig ~/.gitconfig
ln -s ~/.bin/dotfiles/.vimrc ~/.vimrc
ln -s ~/.bin/dotfiles/.tmux.conf ~/.tmux.conf
ln -s ~/.bin/dotfiles/.zprofile ~/.zprofile
ln -s ~/.bin/dotfiles/.zshrc ~/.zshrc
ln -s ~/.bin/dotfiles/.vimrc ~/.ideavimrc
touch ~/.bin/dotfiles/.work.zconfig
}
install_todos() {
cd ~/.bin
git clone git@github.com:ShaneLee/todos.git
cd -
}
install_homebrew
install_with_brew
install_oh_my_zsh
install_with_cask
install_aliases
install_neobundle
install_tmux_plugin_manager
install_lts_node
install_todos
install_with_pip
#install_aws_cli
sudo ln -sfn /usr/local/opt/openjdk@21/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-21.jdk