Skip to content

Instantly share code, notes, and snippets.

@pterk
Created February 1, 2014 22:24
Show Gist options
  • Save pterk/8759866 to your computer and use it in GitHub Desktop.
Save pterk/8759866 to your computer and use it in GitHub Desktop.
Install node in a (python) virtual environment
#!/bin/bash
VERSION="v0.10.25"
ARCHIVE=node-${VERSION}.tar.gz
if [ -z "${VIRTUAL_ENV}" ]; then
echo "Please activate a virtualenv first";
exit
fi
pushd /tmp/
if [ ! -f node-${VERSION}.tar.gz ]
then
wget http://nodejs.org/dist/${VERSION}/${ARCHIVE}
fi
DIRNAME=`tar tzf ${ARCHIVE} 2>/dev/null | head -n 1`
tar xzf ${ARCHIVE}
pushd ${DIRNAME}
./configure --prefix=${VIRTUAL_ENV}
make # PREFIX=${VIRTUAL_ENV}
make install # PREFIX=${VIRTUAL_ENV} install
popd
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment