#!/usr/bin/env bash set -o errexit set -o pipefail #set -x if [[ ! -f "manage.py" ]]; then echo 'Control `manage.py` is not in current directory!' echo 'Please, launch this script from the root directory' echo 'Example: `./utils/start.sh`' exit 1 fi echo "Compiling messages..." ./manage.py compilemessages >/dev/null echo "Migrating..." ./manage.py migrate >/dev/null if [[ -z "$ENVIRONMENT" ]]; then ./manage.py runserver else echo 'Production use is not ready yet!!' exit 1 fi