Skip to content

Instantly share code, notes, and snippets.

@mgedmin
Created March 22, 2013 10:30
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mgedmin/5220368 to your computer and use it in GitHub Desktop.
Save mgedmin/5220368 to your computer and use it in GitHub Desktop.
Shell script to bootstrap a package that uses zc.buildout, wrapped in a virtualenv for site isolation
#!/bin/bash
if [ "${0##*/}" == "virtual-bootstrap-py3" ]; then
python=python3.3
else
python=python2.7
fi
if [ -n "$(netstat -tnl | grep ':3128 ')" ]; then
export http_proxy=http://localhost:3128
echo "Using a local Squid proxy."
fi
set -e
set +x
rm -rf develop-eggs .installed.cfg python
virtualenv -p ${python} python
python/bin/python bootstrap.py
bin/buildout "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment