#!/bin/sh

#CACHE_HOME=/home/head/cvsroot/jboss-head/cache/output/tmp
CACHE_HOME=`dirname $0`
CACHE_LIB=$CACHE_HOME/lib
CACHE_OUTPUT=$CACHE_HOME/output

CLASSPATH=$CACHE_LIB/bsh-core-1.3.0.jar:$CACHE_LIB/bsh-commands-1.3.0.jar:$CACHE_LIB/jboss-aop.jar:$CACHE_LIB/jboss-j2ee.jar:$CACHE_LIB/jgroups.jar:$CACHE_LIB/jboss-cache.jar:$CACHE_LIB/jboss-jmx.jar:$CACHE_LIB/trove.jar:$CACHE_LIB/javassist.jar:$CACHE_LIB/jboss-common.jar:$CACHE_LIB/jboss-system.jar:$CACHE_LIB/log4j.jar:$CACHE_LIB/concurrent.jar

CLASSPATH=$CLASSPATH:./etc:$CACHE_OUTPUT/build
LOG4J=etc/log4j.xml

# OS specific support (must be 'true' or 'false').
cygwin=false;
case "`uname`" in
    CYGWIN*)
        cygwin=true
        ;;
esac

if [ $cygwin = "true" ]; then
   CP=`cygpath -wp $CLASSPATH`
   L4J=`cygpath -wp $LOG4J`
else
   CP=$CLASSPATH
   L4J=$LOG4J
fi

ARGS="-Djava.system.class.loader=org.jboss.aop.standalone.SystemClassLoader -Dlog4j.configuration=file:$L4J"

java -cp $CP $ARGS bsh.Interpreter
