#!/bin/sh

# Source functions library
. /usr/share/java-utils/java-functions

# Source system prefs
if [ -f /etc/jython.conf ] ; then
  . /etc/jython.conf
fi

# Source user prefs
if [ -f $HOME/.jythonrc ] ; then
  . $HOME/.jythonrc
fi

# Configuration
MAIN_CLASS=org.python.util.jython
BASE_FLAGS=-Dpython.home=/usr/share/jython
BASE_JARS="jython/jython guava jnr-constants jnr-ffi jnr-netdb jnr-posix jffi jline/jline jansi/jansi antlr32/antlr-runtime objectweb-asm/asm objectweb-asm/asm-commons objectweb-asm/asm-util commons-compress icu4j netty/netty-buffer netty/netty-codec netty/netty-common netty/netty-handler netty/netty-transport"

# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS

# Let's start
run "$@"
