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