Merge pull request #8 from plutack/fix/nodenv

Dynamically get the latest LTS release version number
This commit is contained in:
David Heinemeier Hansson 2024-06-06 08:37:47 -07:00 committed by GitHub
commit 11a66c5cb6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ source ~/.local/share/omakub/ascii.sh
# Needed for all installers # Needed for all installers
sudo apt update -y sudo apt update -y
sudo apt install -y curl git sudo apt install -y curl git jq
# Ensure computer doesn't go to sleep while installing # Ensure computer doesn't go to sleep while installing
gsettings set org.gnome.desktop.session idle-delay 0 gsettings set org.gnome.desktop.session idle-delay 0

View File

@ -1,6 +1,6 @@
if ! command -v nodenv &>/dev/null; then if ! command -v nodenv &>/dev/null; then
# FIXME: Make this pick whatever the latest LTS is URL="https://nodejs.org/download/release/index.json"
DEFAULT_NODE_VERSION="20.13.1" DEFAULT_NODE_VERSION=$(curl -s "$URL" | jq -r '.[] | select(.lts != false) | .version' | head -n 1)
git clone https://github.com/nodenv/nodenv.git ~/.nodenv git clone https://github.com/nodenv/nodenv.git ~/.nodenv
sudo ln -vs ~/.nodenv/bin/nodenv /usr/local/bin/nodenv sudo ln -vs ~/.nodenv/bin/nodenv /usr/local/bin/nodenv