Created
February 21, 2014 17:55
-
-
Save reening/9139482 to your computer and use it in GitHub Desktop.
Build automation script for Node.js
This file contains hidden or 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/sh | |
VERSION="0.10.25" | |
UPSTREAM="http://nodejs.org/dist/v$VERSION/node-v$VERSION.tar.gz" | |
ARCH="$(dpkg --print-architecture)" | |
BUILDDIR="$PWD/build-v$VERSION" | |
wget $UPSTREAM -O upstream-v$VERSION.tar.gz | |
tar xf upstream-v$VERSION.tar.gz | |
mkdir $BUILDDIR | |
cd node-v$VERSION | |
CONFIGFLAGS="--prefix=$BUILDDIR" | |
case "$ARCH" in | |
armhf|armel) | |
CONFIGFLAGS="$CONFIGFLAGS --without-snapshot" | |
;; | |
esac | |
./configure $CONFIGFLAGS | |
make -j4 | |
make install | |
cd .. | |
rm upstream-v$VERSION.tar.gz | |
rm -rf node-v$VERSION |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment