#!/bin/sh
#the purpose of this file is to bootstrap the compiler when running under rhino
#we pass in the path to the file, because the rhino scirpt has no way to know where it is executing (nothing like __FILE__ in python)
#TODO: link up to the page on stackoverflow that describes this 
#for details, see http://stackoverflow.com/questions/2302948/load-files-on-a-relative-path-to-the-current-file-in-rhino

dn=`dirname $0`
abspath=`cd $dn; pwd`
java -cp ./lib/java/js.jar:./lib/java/commons-cli.jar:./lib/java/serializer.jar:./lib/java/xalan.jar:./lib/java/xercesImpl.jar:./lib/java/xml-apis.jar org.mozilla.javascript.tools.shell.Main -debug runner.js $abspath src/javascript/scxml/cgf/main $*

