-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun.sh
executable file
·42 lines (41 loc) · 832 Bytes
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash
export DJANGO_SETTINGS_MODULE=mystock_backend.dev_settings
head=python3\ manage.py
case $1 in
p)
brew services start postgresql
;;
r)
$head runserver "${@:2}"
;;
m)
$head migrate "${@:2}"
;;
mm)
$head makemigrations "${@:2}"
;;
mm-all)
$head makemigrations course user
;;
shell)
$head shell "${@:2}"
;;
custom)
$head "${@:2}"
;;
rm-mm-all)
echo Are you sure you want to remove all migrations?? [Y/n]
read answer
case $answer in
Y)
echo deleting all migrations
rm -rf **/migrations
;;
n)
echo okay you gave up
;;
*)
echo invalid answer, please input Y or n
;;
esac
esac