You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
546 B
34 lines
546 B
#!/bin/bash |
|
|
|
export FLASK_APP=video_metadata |
|
export FLASK_ENV=development |
|
|
|
|
|
show_help() { |
|
echo "Usage: $0 [OPTION]" |
|
echo "Without options, run the flask builtin server." |
|
echo "" |
|
echo "-h, --help display this help and exit" |
|
echo " --initdb (re-)initialize the the local sqlite DB from schema" |
|
echo " --shell enter interactive python session with flask context" |
|
echo "" |
|
} |
|
|
|
case $1 in |
|
-h|--help) |
|
show_help |
|
;; |
|
--initdb) |
|
flask init-db |
|
;; |
|
--shell) |
|
flask shell |
|
;; |
|
"") |
|
flask run |
|
;; |
|
*) |
|
show_help |
|
;; |
|
esac |
|
|
|
|