run.sh: make it cwd blind
This commit is contained in:
parent
d5fff3a8d6
commit
f6eb112fa9
11
run.sh
11
run.sh
|
@ -1,13 +1,14 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
BASE=`dirname $0`
|
||||||
PROJECT=compte-agglo-montpellier
|
PROJECT=compte-agglo-montpellier
|
||||||
CTL=${PROJECT}
|
CTL=$BASE/${PROJECT}
|
||||||
VENV=${PROJECT}-venv
|
VENV=$BASE/${PROJECT}-venv
|
||||||
|
|
||||||
if [ ! -n "$VIRTUAL_ENV" ]; then
|
if [ ! -n "$VIRTUAL_ENV" ]; then
|
||||||
if [ ! -d $VENV ]; then
|
if [ ! -d $VENV ]; then
|
||||||
./start.sh norun
|
$BASE/start.sh norun
|
||||||
fi
|
fi
|
||||||
. ./$VENV/bin/activate
|
. $VENV/bin/activate
|
||||||
fi
|
fi
|
||||||
./$CTL "${@:-runserver}"
|
$CTL "${@:-runserver}"
|
||||||
|
|
||||||
|
|
Reference in New Issue