#!/bin/bash set -e BUNDLE_VERSION=0.0.5 UNAME=$(uname) if [ "$UNAME" == "Linux" ] ; then MONGO_NAME="mongodb-linux-x86_64-2.0.1" MONGO_URL="http://fastdl.mongodb.org/linux/${MONGO_NAME}.tgz" elif [ "$UNAME" == "Darwin" ] ; then MONGO_NAME="mongodb-osx-x86_64-2.0.1" MONGO_URL="http://fastdl.mongodb.org/osx/${MONGO_NAME}.tgz" else echo "This OS not yet supported" exit 1 fi # save off skybreak checkout dir as final target cd `dirname $0`/.. TARGET_DIR=`pwd` DIR=`mktemp -d -t generate-dev-bundle-XXXXXXXX` trap 'rm -rf "$DIR" >/dev/null 2>&1' 0 echo BUILDING IN "$DIR" cd "$DIR" mkdir build cd build git clone git://github.com/joyent/node.git cd node git checkout v0.6.5 # Disable obnoxious print. No easy way to disable that I found. patch -p1 < .bundle_version.txt rm -rf build tar czf "${TARGET_DIR}/dev_bundle_${UNAME}_${BUNDLE_VERSION}.tar.gz" . echo DONE