Skip to content

Commit

Permalink
Added bootstrap script.
Browse files Browse the repository at this point in the history
This script will configure the baseline repo for development and
deployment.
  • Loading branch information
rca committed May 11, 2012
1 parent dde35b7 commit 294e4e4
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions bootstrap.sh
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
set +e

# make sure we're in the project directory
SCRIPT_DIR=$(dirname $0)
cd "${SCRIPT_DIR}"

# move origin over to baseline
git remote -v | grep -q '^baseline' || git remote rename origin baseline;

if [ ! -e venv ]; then
virtualenv venv --distribute
venv/bin/pip install -r requirements.txt
fi;

# create the virtual environment and install requirements
secret_key=baseline/secretkey.py
if [ ! -e ${secret_key} ]; then
venv/bin/python manage.py secretkey;

git add ${secret_key}
git commit -m"Added ${secret_key}" ${secret_key}
fi;

# create localsettings module
if [ ! -e baseline/localsettings.py ]; then
echo "DEBUG = True" >> baseline/localsettings.py
fi;

# sync the local database
python manage.py syncdb
python manage.py migrate

0 comments on commit 294e4e4

Please sign in to comment.