2012-10-11 03:15:54 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Copyright 2012 Google Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
# Runs the local virtualenv copy of anvil instead of the global one.
|
|
|
|
# Requires that things be setup with ./setup-local.sh (which this will attempt
|
|
|
|
# to invoke if it notices things not quite right).
|
|
|
|
|
|
|
|
|
2012-10-11 03:21:21 +08:00
|
|
|
DIR="$( cd "$( dirname "$0" )" && pwd )"
|
|
|
|
|
|
|
|
|
2012-10-11 03:15:54 +08:00
|
|
|
# Check to see if setup.
|
2012-10-11 03:21:21 +08:00
|
|
|
if [ ! -d "$DIR/local_virtualenv" ]; then
|
2012-10-11 03:15:54 +08:00
|
|
|
echo "Missing local virtualenv - setting up..."
|
2012-10-11 03:21:21 +08:00
|
|
|
$DIR/setup-local.sh
|
2012-10-11 03:15:54 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2012-10-11 03:21:21 +08:00
|
|
|
source $DIR/local_virtualenv/bin/activate
|
|
|
|
python $DIR/anvil/manage.py "$@"
|