Skip to content

Instantly share code, notes, and snippets.

@vibhavsinha
Created January 1, 2017 19:02
Show Gist options
  • Save vibhavsinha/65171f5d968ce9c3d2ed5f037e55eabc to your computer and use it in GitHub Desktop.
Save vibhavsinha/65171f5d968ce9c3d2ed5f037e55eabc to your computer and use it in GitHub Desktop.
Simple node version manager in 4 lines
#!/bin/sh
ls ~/Downloads/node_versions | awk '{print NR"\t"$0}'
read index
val=`ls ~/Downloads/node_versions | head -n $index | tail -1`
ln -sf ~/Downloads/node_versions/$val/bin/node ~/bin/node
@vibhavsinha
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment