run.sh: make it cwd blind

This commit is contained in:
Benjamin Dauvergne 2013-07-24 13:10:33 +02:00
parent d5fff3a8d6
commit f6eb112fa9
1 changed files with 6 additions and 5 deletions

11
run.sh
View File

@ -1,13 +1,14 @@
#!/bin/sh
BASE=`dirname $0`
PROJECT=compte-agglo-montpellier
CTL=${PROJECT}
VENV=${PROJECT}-venv
CTL=$BASE/${PROJECT}
VENV=$BASE/${PROJECT}-venv
if [ ! -n "$VIRTUAL_ENV" ]; then
if [ ! -d $VENV ]; then
./start.sh norun
$BASE/start.sh norun
fi
. ./$VENV/bin/activate
. $VENV/bin/activate
fi
./$CTL "${@:-runserver}"
$CTL "${@:-runserver}"