irongit

can make env variables with dev script

huncholanehuncholaneauthored
parent f7f9496commit 4002e9ace3df6a9fd4ca178d8dc4adecffad525dBrowse files

1 file changed, +10 -0

+10-0dev
@@ -11,6 +11,16 @@ if [ -z "$VIRTUAL_ENV" ]; then
1111 source venv/Scripts/activate
1212 fi
1313
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+
1424 # if first arg is back, build frontend and run backend
1525 if [ "$1" = "back" ]; then
1626 # build the frontend