run.sh: improve run.sh to run in an already activated virtualenv
This commit is contained in:
parent
f1ae216ae0
commit
b4e52fe212
10
run.sh
10
run.sh
|
@ -3,9 +3,11 @@ PROJECT=compte-agglo-montpellier
|
|||
CTL=${PROJECT}
|
||||
VENV=${PROJECT}-venv
|
||||
|
||||
if [ ! -d $VENV ]; then
|
||||
./start.sh
|
||||
else
|
||||
if [ ! -n "$VIRTUAL_ENV" ]; then
|
||||
if [ ! -d $VENV ]; then
|
||||
./start.sh norun
|
||||
fi
|
||||
. ./$VENV/bin/activate
|
||||
./$CTL "${@:-runserver}"
|
||||
fi
|
||||
./$CTL "${@:-runserver}"
|
||||
|
||||
|
|
Reference in New Issue