1
1
Fork 0

Yeet init.sh

dev
Jan Kužílek 5 years ago
parent 454897fc1e
commit 9fb30c8a58

@ -1,9 +1,30 @@
#!/bin/sh #!/bin/bash
export FLASK_APP=yadc
root="."
mkdir -p instance createdirs() {
mkdir -p instance/post/img mkdir -p instance
mkdir -p instance/post/jpeg mkdir -p instance/post/img
mkdir -p instance/post/sample mkdir -p instance/post/jpeg
mkdir -p instance/post/thumb mkdir -p instance/post/sample
mkdir -p instance/post/thumb
}
prepare_instance() {
python3 -m pipenv install
cp yadc/config.def.py instance/config.py 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
Loading…
Cancel
Save