#!/bin/bash
#build file for Unix system
compileDir=$(cd `dirname $0` && /bin/pwd)
if [ $# -lt 1 ]
then
  args="-projecthelp"
else
  args=$@
fi
# Go inside the ProActive directory
cd "$compileDir/.."
trap "echo $args | grep -c junit > /dev/null && dev/scripts/killTests" SIGINT SIGTERM
ANT_HOME="$compileDir" "$JAVA_HOME"/bin/java  -Dant.home="$compileDir" -Dant.library.dir="$compileDir/lib" -Xmx512000000 -classpath "$compileDir"/lib/ant-launcher.jar org.apache.tools.ant.launch.Launcher -buildfile  "$compileDir"/build.xml $args
