blob: 21cdbccb022d13cf94a878799958b5a6d7f700ef [file] [log] [blame]
david_williams744330a2011-01-22 07:04:08 +00001#!/usr/bin/env bash
2# specify devworkspace and JRE to use to runEclipse
3
4
david_williams046115d2011-09-08 18:53:11 +00005devworkspace=./workspace-antRunner
david_williams744330a2011-01-22 07:04:08 +00006
7BUILDFILE=$1
david_williamsa2b87ed2011-02-15 04:01:30 +00008if [ -e $BUILDFILE ]
david_williams744330a2011-01-22 07:04:08 +00009then
10 BUILDFILESTR=" -file $BUILDFILE"
david_williamsa2b87ed2011-02-15 04:01:30 +000011 shift
12fi
david_williams744330a2011-01-22 07:04:08 +000013
david_williamsa2b87ed2011-02-15 04:01:30 +000014extraArgs="$@"
15
16echo "BUILDFILE: $BUILDFILE"
17echo "extraArgs: ${extraArgs}"
18
david_williams26a78e92011-01-22 07:50:08 +000019
david_williams2d36c592011-01-22 07:09:31 +000020# remember to leave no slashes on filename in source command,
21# (the commonVariations.shsource file, that is)
22# so that users path is used to find it (first)
23if [ -z $BUILD_INITIALIZED ]
24then
25 source commonVariations.shsource
26 source ${RELENG_CONTROL}/commonComputedVariables.shsource
27fi
28
david_williams744330a2011-01-22 07:04:08 +000029export JAVA_HOME=${JAVA_5_HOME}
david_williams2d36c592011-01-22 07:09:31 +000030
david_williams744330a2011-01-22 07:04:08 +000031devJRE=$JAVA_HOME/jre/bin/java
32
david_williamse69f1a02011-06-03 06:46:19 +000033# -Xms128M -Xmx256M
34ibmDevArgs="-Dosgi.ws=gtk -Dosgi.os=linux -Dosgi.arch=x86 ${extraArgs}"
david_williams744330a2011-01-22 07:04:08 +000035
david_williamsa2b87ed2011-02-15 04:01:30 +000036devArgs=$ibmDevArgs
david_williams744330a2011-01-22 07:04:08 +000037
38echo dev: $0
david_williams744330a2011-01-22 07:04:08 +000039echo devworkspace: $devworkspace
david_williams744330a2011-01-22 07:04:08 +000040echo devJRE: $devJRE
david_williamse8c219c2011-02-15 06:23:08 +000041#$devJRE -version
david_williams744330a2011-01-22 07:04:08 +000042echo
43
david_williams046115d2011-09-08 18:53:11 +000044if [ -n ${ECLIPSE_EXE} -a ! -z ${ECLIPSE_EXE} -x ${ECLIPSE_EXE} ]
45then
46 ${ECLIPSE_EXE} --launcher.suppressErrors -nosplash -console -data $devworkspace -application org.eclipse.ant.core.antRunner $BUILDFILESTR -vm $devJRE -vmargs $devArgs
47 RC=$?
48else
49 echo "ERROR: ECLIPSE_EXE is not defined to executable eclipse"
50 RC=1001
51fi
52exit $RC