-
Notifications
You must be signed in to change notification settings - Fork 0
/
dependencies.sh
91 lines (80 loc) · 1.85 KB
/
dependencies.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
#!/bin/bash
# Homebrew
if [[ ! -f $(which brew) ]]; then
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | bash
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
brew update
fi
echo "Homebrew installed"
# Rust toolchain
if [[ -f $(which rustup) ]]; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup toolchain install stable
fi
echo "Rustup installed"
# Rust utils
RUST_PKGS=(
bat
ripgrep
git-delta
dua-cli
fd-find
hyperfine
sd
zargs
starship
zellij
git-interactive-rebase-tool
)
for pkg in ${RUST_PKGS[@]}; do
INSTALLED=$(cargo install --list | grep ${pkg})
if [[ ! ${INSTALLED} ]]; then
cargo install ${pkg}
fi
done
echo "Rust utils installed"
# Neovim
[[ -f $(which nvim) ]] || brew install neovim
echo "Neovim installed"
# Fish shell
[[ -f $(which fish) ]] || brew install fish
echo "Fish installed"
# pyenv
[[ -f $(which pyenv) ]] || brew install pyenv
echo "Pyenv installed"
PY_VERSIONS=(
3.9.0
3.10.0
3.11.0
)
for ver in ${PY_VERSIONS[@]}; do
INSTALLED=$(pyenv versions | grep ${ver})
if [[ ! ${INSTALLED} ]]; then
echo "Installing Python ${ver}"
pyenv install ${ver}
else
echo "Python ${ver} installed"
fi
done
# NPM
[[ -f $(which npm) ]] || brew install node
echo "Node.js and NPM installed"
# Language servers
NODE_LSPS=(
pyright
bash-language-server
yaml-language-server
)
for lsp in ${NODE_LSPS[@]}; do
INSTALLED=$(npm list -g | grep ${lsp})
if [[ ! ${INSTALLED} ]]; then
echo "Installing LSP ${ver}"
npm install -g ${lsp}
else
echo "LSP ${lsp} installed"
fi
done
# rust-analyzer
[[ -f $(which rust-analyzer) ]] || brew install rust-analyzer
echo "rust-analyzer installed"