blob: 20689bcc869e97116a627c2875fccab13f71d855 [file] [log] [blame]
david_williams124777a2011-02-15 05:19:51 +00001#!/usr/bin/env bash
2
3# use of this script requires our WTP addRepoProperties app to have already been added to eclipse instance.
4# TODO: we could probably integrate and always call 'install-relengTools.sh' for ease? safety?
5
6APP_NAME=org.eclipse.wtp.releng.tools.addRepoProperties
7
8devworkspace=./workspace
9
10JAVA_5_HOME=/shared/webtools/apps/ibm-java2-sdk-5.0-12.1-linux-i386
11JAVA_6_HOME=/shared/webtools/apps/ibm-java-sdk-6.0-8.1-linux-i386
12export JAVA_HOME=${JAVA_6_HOME}
13devJRE=$JAVA_HOME/jre/bin/java
14
15ibmDevArgs="-Xms128M -Xmx256M -Dosgi.ws=gtk -Dosgi.os=linux -Dosgi.arch=x86"
16
17
18#REPO="/shared/webtools/committers/wtp-R3.3.0-I/20101209114749/S-3.3.0M4-20101209114749/repository"
19#BUILD_BRANCH=R3.3.0
20#BUILD_ID=S-3.3.0M4-20101209114749
21#STATS_TAG_SUFFIX=_indigo_M4
22
23REPO=$1
24BUILD_BRANCH=$2
25BUILD_ID=$3
26STATS_TAG_SUFFIX=$4
27
28if [[ -z REPO ]]
29then
30 echo "ERROR: this script requires a repository to add properties to.";
31 exit 1;
32fi
33
34echo "BUILD_BRANCH: ${}
35
36if [[ \( ! \( -z "${BUILD_BRANCH"} \) \) -a \( ! \( -z "${BUILD_ID}" \) \) ]]
37then
38 MIRRORURL="/webtools/downloads/drops/${BUILD_BRANCH}/${BUILD_ID}/repository/"
39else
40 echo "WARNING: no mirror URL specified.";
41 MIRRORURL=""
42fi
43
44if [ ! -z $MIRRORURL ]
45then
46 MIRRORURL_ARG="http://www.eclipse.org/downloads/download.php?format=xml&file=${MIRRORURL}&protocol=http"
47else
48 MIRRORURL_ARG=""
49fi
50
51# remember, the '&' should NOT be unescaped here ... the p2 api (or underlying xml) will escape it.
52devArgs="$ibmDevArgs \
53-Dp2MirrorsURL=${MIRRORURL_ARG} \
54-DartifactRepoDirectory=${REPO} \
55-Dp2StatsURI=http://download.eclipse.org/stats/webtools/repository/indigo -DstatsArtifactsSuffix="${STATS_TAG_SUFFIX}" -DstatsTrackedArtifacts=org.eclipse.wst.jsdt.feature,org.eclipse.wst.xml_ui.feature,org.eclipse.wst.web_ui.feature,org.eclipse.jst.enterprise_ui.feature"
56
57
58echo "dev: " $0
59echo
60echo "devworkspace: " $devworkspace
61echo
62echo "devJRE: " $devJRE
63echo
64echo "devArgs: " $devArgs
65echo
66echo "APP_NAME: " $APP_NAME
67$devJRE -version
68echo
69
70ECLIPSE_INSTALL=/shared/webtools/apps/eclipse361/eclipse
71
72$ECLIPSE_INSTALL/eclipse -debug -nosplash -consolelog -console -data $devworkspace --launcher.suppressErrors -application ${APP_NAME} ${OTHER_ARGS} -vm $devJRE -vmargs $devArgs
73