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

26 lines
499 B
Bash
Raw Normal View History

2024-02-03 21:54:05 +01:00
#!/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
2024-02-05 21:16:11 +01:00
echo "Compiling messages..."
2024-02-03 21:54:05 +01:00
./manage.py compilemessages >/dev/null
2024-02-05 21:16:11 +01:00
echo "Migrating..."
2024-02-03 22:07:20 +01:00
./manage.py migrate >/dev/null
2024-02-05 21:16:11 +01:00
if [[ -z "$ENVIRONMENT" ]]; then
./manage.py runserver
else
echo 'Production use is not ready yet!!'
exit 1
fi