--- trunk/bin/dev.sh 2008/11/30 15:04:07 639 +++ trunk/bin/dev.sh 2008/12/01 22:01:16 658 @@ -1,13 +1,28 @@ -#!/bin/sh +#!/bin/sh -x + +# This is my homage to Erlang - self restarting perl :-) +# +# it enabled to use die and confess when needed without +# having to worry about development flow server=./bin/server-mojo.pl +pid=`cat var/dev.pid` +echo "## $pid" +if [ ! -z "$pid" ] ; then + echo "# kill $pid" + kill $pid + killall server-mojo.pl +fi + +echo $$ > var/dev.pid + export FREY_SWITCH_SCREEN=1 while true ; do FREY_NO_LOG=1 perl -c $server || exit - FREY_RESTART=1 $server + FREY_RESTART=1 $server || exit FREY_SWITCH_SCREEN=0 done