Merge pull request #8 from plutack/fix/nodenv
Dynamically get the latest LTS release version number
This commit is contained in:
commit
11a66c5cb6
@ -3,7 +3,7 @@ source ~/.local/share/omakub/ascii.sh
|
||||
|
||||
# Needed for all installers
|
||||
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
|
||||
gsettings set org.gnome.desktop.session idle-delay 0
|
||||
|
@ -1,6 +1,6 @@
|
||||
if ! command -v nodenv &>/dev/null; then
|
||||
# FIXME: Make this pick whatever the latest LTS is
|
||||
DEFAULT_NODE_VERSION="20.13.1"
|
||||
URL="https://nodejs.org/download/release/index.json"
|
||||
DEFAULT_NODE_VERSION=$(curl -s "$URL" | jq -r '.[] | select(.lts != false) | .version' | head -n 1)
|
||||
|
||||
git clone https://github.com/nodenv/nodenv.git ~/.nodenv
|
||||
sudo ln -vs ~/.nodenv/bin/nodenv /usr/local/bin/nodenv
|
||||
|
Loading…
Reference in New Issue
Block a user