Skip to content

Instantly share code, notes, and snippets.

@bmoore
Forked from tbranyen/install_node.sh
Last active December 16, 2015 19:18
Show Gist options
  • Save bmoore/5483645 to your computer and use it in GitHub Desktop.
Save bmoore/5483645 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Usage: install_node 0.6.16
DIR=~/.node
TARGET=/Volumes/Macintosh\ HD
VER=$*
if [ ! -f ~/.node/$VER.pkg ]; then
curl --create-dirs -o $DIR/$VER.pkg http://nodejs.org/dist/v$VER/node-v$VER.pkg
fi
sudo installer -pkg $DIR/$VER.pkg -target $TARGET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment