Extract node version
This commit is contained in:
parent
24e472a2c6
commit
1eedf41057
@ -1,4 +1,6 @@
|
||||
if ! command -v nodenv &>/dev/null; then
|
||||
DEFAULT_NODE_VERSION="20.13.1"
|
||||
|
||||
git clone https://github.com/nodenv/nodenv.git ~/.nodenv
|
||||
sudo ln -vs ~/.nodenv/bin/nodenv /usr/local/bin/nodenv
|
||||
cd ~/.nodenv
|
||||
@ -7,7 +9,7 @@ if ! command -v nodenv &>/dev/null; then
|
||||
mkdir -p "$(nodenv root)"/plugins
|
||||
git clone https://github.com/nodenv/node-build.git "$(nodenv root)"/plugins/node-build
|
||||
git clone https://github.com/nodenv/nodenv-aliases.git $(nodenv root)/plugins/nodenv-aliases
|
||||
nodenv install 20.11.1
|
||||
nodenv global 20.11.1
|
||||
nodenv install $DEFAULT_NODE_VERSION
|
||||
nodenv global $DEFAULT_NODE_VERSION
|
||||
sudo ln -vs $(nodenv root)/shims/* /usr/local/bin/
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user