rosedu/wouso

View on GitHub
configure

Summary

Maintainability
Test Coverage
#!/bin/bash

EASY_INSTALL_MODULES=django-logdb
APT_PACKAGES="python-django python-virtualenv python-imaging python-dev libsqlite3-dev sqlite3"

# This configure script should run just fine on ubuntu 10.10 and newer

# Apts
sudo apt-get install $APT_PACKAGES

# Easy install
which easy_install &> /dev/null
if [ ! $? == 0 ]; then
    sudo apt-get install python-setuptools
fi

# Requirements
sudo easy_install $EASY_INSTALL_MODULES

# Django parts
cd wouso

if [ ! -f settings.py ]; then
    echo "Linking settings.py.example to settings.py"
    ln -sf settings.py.example settings.py
fi

# Syncdb and setup
./manage.py wousoctl --setup


# Done
echo "Done!"
echo "Now run:"
echo "    cd wouso; ./manage.py runserver"