#!/bin/sh

#+
#  Name:
#     jystilts

#  Purpose:
#     Invokes jython with stilts classses on unix.

#  Description:
#     This shell script starts up Jython with STILTS classes from a
#     starjava installation.  It is not intended for use in invoking
#     JyStilts in other contexts (e.g. using the standalone stilts.jar
#     file).
#
#     Java must be on the PATH for this to work.

#  Authors:
#     MBT: Mark Taylor
#-

bindir="`dirname $0`"
starjava=$bindir/..
stilts_jar=$starjava/lib/ttools/stilts-app.jar
jython_jar=`echo $starjava/lib/ttools/jython-standalone*.jar`
pylib_dir=$starjava/etc/ttools
pypath_def="-Dpython.path=$pylib_dir"
classpath=${stilts_jar}:${jython_jar}
main_class=org.python.util.jython

java $pypath_def -classpath $classpath $main_class "$@"
