This repository has been archived on 2025-03-03. You can view files and clone it, but cannot push or open issues or pull requests.
facturio/utils/start.sh

25 lines
499 B
Bash
Executable file

#!/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