Skip to content

Instantly share code, notes, and snippets.

@joergpatz
Created November 14, 2016 16:04
Show Gist options
  • Save joergpatz/7b76fd1b65311abfca03c970d75c28b9 to your computer and use it in GitHub Desktop.
Save joergpatz/7b76fd1b65311abfca03c970d75c28b9 to your computer and use it in GitHub Desktop.
script for updating Node Version Manager
#!/bin/sh
set -e
cd ~/.nvm
git fetch --tags
TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "Checking out tag $TAG..."
git checkout "$TAG"
source ~/.nvm/nvm.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment