#!/bin/sh
set -e

# Is python2.1 installed?
if [ ! -d /usr/lib/python2.1 ]; then
	echo "ERROR: jythonc requires python2.1 in order to run properly."
	echo "       Please install the python2.1 package."
	exit 1
fi

# Specify how we will call the Java compiler.
if [ -z "$JAVAC" ]; then
	JAVAC=/usr/bin/javac
fi

# Run jythonc.
export JAVAC
export CALLED_FROM_JYTHONC=1
/usr/bin/jython /usr/share/jython/Tools/jythonc/jythonc.py "$@"
