blob: c7e958a18ec56b7b5483dae1280eade69ddf897d [file] [log] [blame]
david_williams744330a2011-01-22 07:04:08 +00001#!/usr/bin/env bash
nickboldt03a6f082019-02-12 15:17:11 -05002#*******************************************************************************
3# Copyright (c) 2011, 2019 IBM Corporation and others.
4# This program and the accompanying materials
5# are made available under the terms of the Eclipse Public License 2.0
6# which accompanies this distribution, and is available at
7# https://www.eclipse.org/legal/epl-2.0/
8#
9# SPDX-License-Identifier: EPL-2.0
10#
11# Contributors:
12# IBM Corporation - initial API and implementation
13#*******************************************************************************
david_williams744330a2011-01-22 07:04:08 +000014# specify devworkspace and JRE to use to runEclipse
15
16
david_williams046115d2011-09-08 18:53:11 +000017devworkspace=./workspace-antRunner
david_williams744330a2011-01-22 07:04:08 +000018
19BUILDFILE=$1
david_williamsa2b87ed2011-02-15 04:01:30 +000020if [ -e $BUILDFILE ]
david_williams744330a2011-01-22 07:04:08 +000021then
22 BUILDFILESTR=" -file $BUILDFILE"
david_williamsa2b87ed2011-02-15 04:01:30 +000023 shift
24fi
david_williams744330a2011-01-22 07:04:08 +000025
david_williamsa2b87ed2011-02-15 04:01:30 +000026extraArgs="$@"
27
28echo "BUILDFILE: $BUILDFILE"
29echo "extraArgs: ${extraArgs}"
30
david_williams26a78e92011-01-22 07:50:08 +000031
david_williams2d36c592011-01-22 07:09:31 +000032# remember to leave no slashes on filename in source command,
33# (the commonVariations.shsource file, that is)
34# so that users path is used to find it (first)
35if [ -z $BUILD_INITIALIZED ]
36then
37 source commonVariations.shsource
38 source ${RELENG_CONTROL}/commonComputedVariables.shsource
39fi
40
david_williams744330a2011-01-22 07:04:08 +000041export JAVA_HOME=${JAVA_5_HOME}
david_williams2d36c592011-01-22 07:09:31 +000042
david_williams744330a2011-01-22 07:04:08 +000043devJRE=$JAVA_HOME/jre/bin/java
44
david_williamse69f1a02011-06-03 06:46:19 +000045# -Xms128M -Xmx256M
46ibmDevArgs="-Dosgi.ws=gtk -Dosgi.os=linux -Dosgi.arch=x86 ${extraArgs}"
david_williams744330a2011-01-22 07:04:08 +000047
david_williamsa2b87ed2011-02-15 04:01:30 +000048devArgs=$ibmDevArgs
david_williams744330a2011-01-22 07:04:08 +000049
50echo dev: $0
david_williams744330a2011-01-22 07:04:08 +000051echo devworkspace: $devworkspace
david_williams744330a2011-01-22 07:04:08 +000052echo devJRE: $devJRE
david_williamse8c219c2011-02-15 06:23:08 +000053#$devJRE -version
david_williams744330a2011-01-22 07:04:08 +000054echo
55
candersonea5ddfa2011-09-12 15:39:06 +000056if [ -n ${ECLIPSE_EXE} -a -x ${ECLIPSE_EXE} ]
david_williams046115d2011-09-08 18:53:11 +000057then
58 ${ECLIPSE_EXE} --launcher.suppressErrors -nosplash -console -data $devworkspace -application org.eclipse.ant.core.antRunner $BUILDFILESTR -vm $devJRE -vmargs $devArgs
59 RC=$?
60else
61 echo "ERROR: ECLIPSE_EXE is not defined to executable eclipse"
62 RC=1001
63fi
64exit $RC