Created
August 7, 2010 01:50
-
-
Save paulbaumgart/512321 to your computer and use it in GitHub Desktop.
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
#/usr/bin/env sh | |
check_and_exit () { | |
if [ ! "$?" = "0" ]; then | |
echo "$1" | |
exit 1 | |
fi | |
} | |
# Node.JS | |
if [ ! -d node ]; then | |
git clone git://github.com/ry/node.git | |
check_and_exit "Error cloning Node.JS." | |
pushd node | |
git checkout v0.1.95 | |
check_and_exit "Error checking out v0.1.95 of Node.JS." | |
./configure | |
check_and_exit "Error compiling Node.JS." | |
make | |
check_and_exit "Error compiling Node.JS." | |
sudo make install | |
check_and_exit "Error installing Node.JS." | |
popd | |
fi | |
# kriskowal's Narwhal | |
if [ ! -d narwhal ]; then | |
git clone git://github.com/kriskowal/narwhal.git | |
check_and_exit "Error cloning Narwhal." | |
pushd narwhal | |
git checkout origin/future | |
check_and_exit "Error installing Narwhal." | |
else | |
pushd narwhal | |
fi | |
# narwhal-node | |
if [ ! -d packages/narwhal-node ]; then | |
pushd packages | |
git clone git://github.com/kriskowal/narwhal-node.git | |
check_and_exit "Error cloning narwhal-node." | |
pushd narwhal-node | |
make | |
check_and_exit "Error compiling narwhal-node." | |
popd | |
popd | |
fi | |
# set up env | |
export NARWHAL_ENGINE=node | |
export NARWHAL_ENGINE_HOME=packages/narwhal-node | |
source bin/activate | |
js examples/hello | |
check_and_exit "Error installing narwhal-node." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment