Something went wrong. Try again.
Mirroring: https://github.com/MunifTanjim/scripts.sh
Something went wrong. Try again.
scripts.sh setup-nvm
486 B · 24 lines
at main
12345678910111213141516171819202122232425#!/usr/bin/env bash
# install/update nvm# https://github.com/nvm-sh/nvm
export NVM_DIR="${NVM_DIR:-"${HOME}/.local/share/nvm"}"
if [[ -d "${NVM_DIR}" ]]; then echo "nvm is already installed!"
cd "${NVM_DIR}" if ! [[ -d .git ]]; then exit 0 fi
echo "Updating nvm..." git fetch originelse echo "Installing nvm..." git clone https://github.com/nvm-sh/nvm "${NVM_DIR}" cd "${NVM_DIR}"fi
git checkout $(git describe --abbrev=0 --tags --match "v[0-9]*" origin)