dotfiles/bashrc.d/node.bashrc

17 lines
439 B
Plaintext
Raw Normal View History

2024-09-14 17:05:53 -04:00
# https://github.com/nodenv/nodenv
function install_nodenv {
if command -v nodenv &> /dev/null; then
echo "Nodenv is already installed."
return 1
fi
git clone https://github.com/nodenv/nodenv.git ${HOME}/.nodenv
git clone https://github.com/nodenv/node-build.git ${HOME}/.nodenv/plugins/node-build
2024-09-14 17:05:53 -04:00
}
if [ -d "${HOME}/.nodenv" ]; then
export PATH=${PATH}:${HOME}/.nodenv/bin
eval "$(${HOME}/.nodenv/bin/nodenv init - bash)"
fi