#! /bin/sh


IREPORT_CLASSPATH="/usr/local/share/java/classes/JasperBabylon-1.0.0.jar:/usr/local/share/java/classes/antlr.jar:/usr/local/share/java/classes/asm-attrs.jar:/usr/local/share/java/classes/asm.jar:/usr/local/share/java/classes/barbecue-1.1.jar:/usr/local/share/java/classes/bsh.jar:/usr/local/share/java/classes/cglib-2.1.jar:/usr/local/share/java/classes/cincom-jr-xmla.jar:/usr/local/share/java/classes/commons-beanutils.jar:/usr/local/share/java/classes/commons-collections.jar:/usr/local/share/java/classes/commons-dbcp.jar:/usr/local/share/java/classes/commons-digester.jar:/usr/local/share/java/classes/commons-javaflow-20060411.jar:/usr/local/share/java/classes/commons-logging.jar:/usr/local/share/java/classes/commons-logging-api.jar:/usr/local/share/java/classes/commons-math.jar:/usr/local/share/java/classes/commons-pool.jar:/usr/local/share/java/classes/commons-vfs-1.0.jar:/usr/local/share/java/classes/dom4j.jar:/usr/local/share/java/classes/ehcache-1.1.jar:/usr/local/share/java/classes/eigenbase-properties.jar:/usr/local/share/java/classes/eigenbase-resgen.jar:/usr/local/share/java/classes/eigenbase-xom.jar:/usr/local/share/java/classes/flexdock-0.4.1.jar:/usr/local/share/java/classes/groovy-all-1.0.jar:/usr/local/share/java/classes/hibernate3.jar:/usr/local/share/java/classes/iReport.jar:/usr/local/share/java/classes/itext.jar:/usr/local/share/java/classes/bcel.jar:/usr/local/share/java/classes/jasperreports.jar:/usr/local/share/java/classes/jasperreports-extensions-1.3.1.jar:/usr/local/share/java/classes/javacup.jar:/usr/local/share/java/classes/jaxen-full.jar:/usr/local/share/java/classes/jcmdline.jar:/usr/local/share/java/classes/jcommon.jar:/usr/local/share/java/classes/jdt-compiler-3.1.1.jar:/usr/local/share/java/classes/jfreechart.jar:/usr/local/share/java/classes/jpa.jar:/usr/local/share/java/classes/jsmoothgen-ant-0.9.7.jar:/usr/local/share/java/classes/jta.jar:/usr/local/share/java/classes/jxl-2.6.jar:/usr/local/share/java/classes/log4j.jar:/usr/local/share/java/classes/looks.jar:/usr/local/share/java/classes/microba-0.4.1-bin.jar:/usr/local/share/java/classes/mondrian-2.3.2.8944.jar:/usr/local/share/java/classes/mysql-connector-java.jar:/usr/local/share/java/classes/nsisant-1.1.jar:/usr/local/share/java/classes/png-encoder-1.5.jar:/usr/local/share/java/classes/poi.jar:/usr/local/share/java/classes/postgresql.jar:/usr/local/share/java/classes/rex-20070125.jar:/usr/local/share/java/classes/saaj-api-1.3.jar:/usr/local/share/java/classes/servlet.jar:/usr/local/share/java/classes/spring-2.0-m2.jar:/usr/local/share/java/classes/spring-context-2.0-m2.jar:/usr/local/share/java/classes/spring-hibernate3-2.0-m2.jar:/usr/local/share/java/classes/sqleonardo-2007.03.jar:/usr/local/share/java/classes/swingx-2007_05_13.jar:/usr/local/share/java/classes/tinylaf.jar:/usr/local/share/java/classes/toniclf.jar:/usr/local/share/java/classes/xalan.jar:/usr/local/share/java/classes/xercesImpl.jar:/usr/local/share/java/classes/xml-apis.jar:/usr/local/diablo-jdk1.5.0/lib/tools.jar:/usr/local/share/ireport/fonts"
IREPORT_HOME="$HOME/ireport"

# Since iReport-1.2.2, $IREPORT_HOME must be writable
/bin/mkdir -p $IREPORT_HOME/lib
/bin/rm $IREPORT_HOME/plugins $IREPORT_HOME/templates 2>/dev/null || /usr/bin/true
/bin/ln -sf /usr/local/share/ireport/plugins $IREPORT_HOME/plugins
/bin/ln -sf /usr/local/share/ireport/templates $IREPORT_HOME/templates
cd $IREPORT_HOME
JAVA_VERSION="1.4+" /usr/local/bin/java -classpath "$IREPORT_CLASSPATH:$CLASSPATH" -Direport.home=$IREPORT_HOME it.businesslogic.ireport.gui.MainFrame "$@"
