Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Basic OS X install script for Brubeck.
#!/usr/bin/env sh
# Brubeck install script cribbed from:
# Version numbers and directories.
# Choose eventlet or gevent.
# EVENT_LIB="gevent"
# Check tool dependencies.
if [ "$#" -ne 1 ]; then
echo "Specify where you want Brubeck installed." && exit 1
if [ -d "$1" ]; then
echo "Directory $1 already exists. Aborting." && exit 1
hash git 2>&- || { echo "Requires git. Aborting."; exit 1; }
hash pip 2>&- || { echo "Requires pip. Aborting."; exit 1; }
hash wget 2>&- || { echo "Requires wget. Aborting."; exit 1; }
hash virtualenv 2>&- || { echo "Requires virtualenv. Aborting."; exit 1; }
if [ ! $WORKON_HOME ]; then
echo "Requires virtualenvwrapper. Aborting." && exit 1
# Create install directory.
mkdir $1
cd $1
# Fetching and unpacking sources.
echo "Fetching Brubeck source..."
git clone
echo "Done."
echo "Fetching Mongrel2 source..."
git clone
echo "Done."
echo "Fetching and unpacking ZeroMQ source..."
wget --no-verbose$ZMQ_VERSION.tar.gz
tar zxf zeromq-$ZMQ_VERSION.tar.gz
rm zeromq-$ZMQ_VERSION.tar.gz
echo "Done."
# Making sources.
echo "Making ZeroMQ..."
cd zeromq-$ZMQ_VERSION
sudo make install
cd ..
echo "Done."
echo "Making Mongrel2..."
cd mongrel2
sudo make install
cd ..
echo "Done."
# Setting up virtualenv, requirements, and finally Brubeck.
echo "Setting up virtualenv..."
source /usr/local/bin/
mkvirtualenv $VIRTUALENV_NAME
echo "Done."
echo "Setting up requirements..."
cd brubeck
pip install -I -r ./envs/brubeck.reqs
pip install -I -r ./envs/$EVENT_LIB.reqs
echo "Done."
echo "Setting up Brubeck..."
python install
echo "Done."
echo "Install complete. virtualenv is $VIRTUALENV_NAME."
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.