#!/bin/sh
#
#
WEBSTONEROOT=`pwd` ; export WEBSTONEROOT

case $1 in
  '-gui')
	  bin/webstone-gui > /tmp/webstone-gui.$$ 2>&1
	  ;;
  '-kill')
	   cd bin
	   ./killbench
	   ;;
  '-nogui')
	    cd bin
	    ./runbench
	    ;;
  '-genfiles')
	       cd bin
	       ./genfiles
	       ;;
  '-silent')
	     $WEBSTONEROOT/webstone -nogui > /dev/null 2>&1 &
	     ;;
  '-tail')
	   LATEST=$WEBSTONEROOT/bin/runs/`ls -1 $WEBSTONEROOT/bin/runs | tail -1`/run
	   tail -f $LATEST
	   ;;
  '-results')
	      $WEBSTONEROOT/bin/wscollect $WEBSTONEROOT/bin/runs
	      ;;
  *)
     $WEBSTONEROOT/webstone -nogui
     ;;
esac

# end
