1eacb71a362f2077178455647d0ac62b4bb92cf2
[myslice.git] / devel / server-loop.sh
1 #!/bin/bash
2 DIRNAME=$(dirname $0)
3 cd $DIRNAME/..
4
5 # default port : if hostname starts with z -> use 8080 ; otherwise take 80
6 hostname | grep -q '^z' && port=8080 || port=80
7 [[ -n "$@" ]] && port=$1
8
9 while true; do 
10     make all-static all-templates
11     ./manage.py runserver 0.0.0.0:$port
12 done