#!/bin/bash HERE=`dirname $0` # snot will dump exec arguments in the file (overwrite) CONT=`tempfile -p snot-` # on error, pause a couple of seconds before reloading PAUSE=10 # the default behaviour is just to restart. echo "$0" >$CONT # echo 'cat /dev/null' >$CONT # run scheme mzscheme -qr $HERE/snot-load.ss $CONT || sleep $PAUSE # invoke continuation ARGS=`cat $CONT` rm $CONT # safety # sleep 1 echo ';; restarting' exec $ARGS # exec $0