1
1
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yadc/init.sh

30 lines
496 B
Bash

#!/bin/bash
export FLASK_APP=yadc
root="."
createdirs() {
mkdir -p instance
mkdir -p instance/post/img
mkdir -p instance/post/jpeg
mkdir -p instance/post/sample
mkdir -p instance/post/thumb
}
prepare_instance() {
python3 -m pipenv install
createdirs
cp yadc/config.def.py instance/config.py
}
prepare_db() {
python3 -m pipenv run flask upgrade
}
case $1 in
"instance"|"")
prepare_instance
;;
"db")
prepare_db
;;
esac