2019-09-05 14:39:50 +00:00
|
|
|
#!/bin/sh
|
2019-09-05 12:42:21 +00:00
|
|
|
|
2019-10-09 14:10:30 +00:00
|
|
|
if [[ $# -eq 0 ]]
|
2019-09-05 12:42:21 +00:00
|
|
|
then
|
2019-09-13 06:49:00 +00:00
|
|
|
venv/bin/python -u opaque.py
|
2019-10-09 14:10:30 +00:00
|
|
|
elif [[ $1 == "--migrate" ]]
|
|
|
|
then
|
|
|
|
echo Migrating changes.
|
|
|
|
venv/bin/python -m flask db migrate
|
|
|
|
venv/bin/python -m flask db upgrade
|
2019-09-05 12:42:21 +00:00
|
|
|
else
|
2019-09-06 09:38:35 +00:00
|
|
|
if [[ $1 == "--setup-database" ]]
|
2019-09-05 12:42:21 +00:00
|
|
|
then
|
2019-10-09 14:10:30 +00:00
|
|
|
echo Initial setup of database.
|
2019-09-06 09:38:35 +00:00
|
|
|
venv/bin/python -m flask db init
|
|
|
|
venv/bin/python -m flask db upgrade
|
|
|
|
venv/bin/python -m flask insert-initial-database-entries
|
2019-09-05 12:42:21 +00:00
|
|
|
fi
|
|
|
|
fi
|