-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
executable file
·99 lines (81 loc) · 1.82 KB
/
install.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
#!/bin/sh
set -e
setup_base() {
HOMEBREW_URL=https://raw.githubusercontent.com/Homebrew/install/master/install
if ! which brew >/dev/null 2>/dev/null; then
/usr/bin/ruby -e "$(curl -fsSL $HOMEBREW_URL)" 2>/dev/null >/dev/null
fi
brew tap 'homebrew/bundle'
brew bundle check || brew bundle || true
brew upgrade || true
brew cleanup
git submodule update --init
pip3 install --user -U pip neovim pynvim msgpack
gem install --no-document -u neovim
vim +PlugUpgrade +PlugUpdate +qa
vim +UpdateRemotePlugins +GoUpdateBinaries +qa
nvim +PackerSync +qa
}
setup_shell() {
fish_shell=$(brew --prefix fish)/bin/fish
if ! grep fish /etc/shells; then
echo "$fish_shell" | sudo tee -a /etc/shells
chsh -s "$fish_shell"
$fish_shell -l -c 'type -q fisher; and exit 0; or curl -sL https://git.io/fisher | source; fisher install jorgebucaran/fisher'
fi
}
setup_node() {
if which npm >/dev/null 2>/dev/null; then
npm i -g \
npm \
eslint \
neovim \
prettier \
tslint \
typescript \
yarn \
quicktype \
ts-node \
bash-language-server \
typescript-language-server
fi
}
setup_rust() {
if ! which rustc >/dev/null 2>/dev/null; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
fi
rustup self update
rustup update
rustup component add clippy rls
rustup +nightly component add clippy rls miri
rustup default stable
rustup target add \
aarch64-linux-android \
armv7-linux-androideabi \
x86_64-linux-android \
i686-linux-android \
aarch64-apple-ios \
x86_64-apple-ios
cargo install \
cargo-bloat \
cargo-fuzz \
cargo-fix \
cargo-cache \
cargo-make \
cargo-watch
}
setup_cleanup() {
brew cleanup
}
main() {
if [ "$(uname -s)" != "Darwin" ]; then
echo "only mac os supported"
exit 1
fi
setup_base
setup_shell
setup_node
setup_rust
setup_cleanup
}
main