-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-js
More file actions
executable file
·34 lines (25 loc) · 801 Bytes
/
Copy pathinstall-js
File metadata and controls
executable file
·34 lines (25 loc) · 801 Bytes
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
#!/usr/bin/env bash
set -euo pipefail
# Parse comma-separated node versions into array
IFS=',' read -ra node_versions <<<"$(~/.dotfiles/bin/dotfiles-version node)"
get-nvm-version() {
if [ -d ~/.nvm ]; then
(cd ~/.nvm && git describe --tags)
fi
}
nvm_version="$(~/.dotfiles/bin/dotfiles-version nvm)"
if ! [ "$(get-nvm-version)" = "$nvm_version" ]; then
curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/${nvm_version}/install.sh" | bash
else
echo "nvm ${nvm_version} already installed"
fi
# shellcheck source=/dev/null.
source ~/.nvm/nvm.sh
for nv in "${node_versions[@]}"; do
nvm install "$nv"
done
nvm alias default 22.17.1
npm install --global yarn
npm install -g bash-language-server
# https://rustwasm.github.io/docs/book/game-of-life/setup.html
# npm install npm@latest -g