updated script

This commit is contained in:
Tony Tam
2012-09-06 09:09:12 -07:00
parent 2dcfebea98
commit 7c812c2426

View File

@@ -1,24 +1,5 @@
#!/bin/bash
echo "" > classpath.txt
for file in `ls target/*.jar`;
do echo -n '' >> classpath.txt;
echo -n $file >> classpath.txt;
echo -n ':' >> classpath.txt;
done
for file in `ls target/lib`;
do echo -n 'target/lib/' >> classpath.txt;
echo -n $file >> classpath.txt;
echo -n ':' >> classpath.txt;
done
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
export JAVA_OPTS="${JAVA_OPTS} -DXmx4096M"
scala $WORDNIK_OPTS $JAVA_OPTS -cp $CLASSPATH "$@"
WORDNIK_OPTS=${WORDNIK_OPTS:=NOPE}
if [ $WORDNIK_OPTS = NOPE ];
then
export WORDNIK_OPTS="-DconfigFile=conf/config.xml -DdevMode=true"
fi
export CLASSPATH=$(cat classpath.txt)
export JAVA_OPTS="${JAVA_OPTS} -DrulePath=data -Xmx4096M -DloggerPath=conf/log4j.properties"
scala $WORDNIK_OPTS $JAVA_CONFIG_OPTIONS -cp $CLASSPATH "$@"