can make env variables with dev script
1 file changed, +10 -0
+10-0dev
| @@ -11,6 +11,16 @@ if [ -z "$VIRTUAL_ENV" ]; then | ||
| 11 | 11 | source venv/Scripts/activate |
| 12 | 12 | fi |
| 13 | 13 | |
| 14 | +# if first arg is var, add a variable to venv/Scripts/activate | |
| 15 | +if [ "$1" = "var" ]; then | |
| 16 | + echo "export $2=$3" >> venv/Scripts/activate | |
| 17 | + # if venv is activated, deactivate it | |
| 18 | + if [ ! -z "$VIRTUAL_ENV" ]; then | |
| 19 | + deactivate | |
| 20 | + fi | |
| 21 | + source venv/Scripts/activate | |
| 22 | +fi | |
| 23 | + | |
| 14 | 24 | # if first arg is back, build frontend and run backend |
| 15 | 25 | if [ "$1" = "back" ]; then |
| 16 | 26 | # build the frontend |