Created
February 1, 2014 22:24
-
-
Save pterk/8759866 to your computer and use it in GitHub Desktop.
Install node in a (python) virtual environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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