Skip to content

Instantly share code, notes, and snippets.

@quad
Created February 11, 2010 01:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quad/301071 to your computer and use it in GitHub Desktop.
Save quad/301071 to your computer and use it in GitHub Desktop.
Deploy stardate on julia
#!/bin/sh -e
deploy ()
{
VERSION="2.5"
PYTHON="$(which python$VERSION)"
export PYTHONPATH="$1/lib/python$VERSION/site-packages"
mkdir -p $PYTHONPATH
wget -c http://peak.telecommunity.com/dist/ez_setup.py
$PYTHON ez_setup.py --prefix=$1 pip virtualenv
}
PREFIX="/home/stardate"
LOCAL="$PREFIX/trampoline"
LOCAL_BIN="$LOCAL/bin"
PRODUCTION="$PREFIX/production"
PRODUCTION_BIN="$PRODUCTION/bin"
deploy $LOCAL
$LOCAL_BIN/virtualenv $PRODUCTION
$LOCAL_BIN/pip install -E $PRODUCTION -e git+/home/scott/stardate.git@origin/production#egg=stardate
source $PRODUCTION/bin/activate
[ "$(pidof -x lamson)" ] && (cd $PRODUCTION/src/stardate/ && lamson stop)
[ "$(pidof -x lamson)" ] && kill $(pidof -x lamson)
(cd $PRODUCTION/src/stardate/ && lamson start)
echo "stardate boostrapped!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment