blob: 36adfd61c6af3ff01ba923545e4b44676726acba [file] [log] [blame]
Stephan Herrmanna53f6d32011-03-30 01:14:24 +00001#!/bin/sh
2
Stephan Herrmanne1aaa442012-06-02 22:15:06 +02003if [ ! -d $1 ]
4then
5 echo "Not a directory: $1"
6 exit 1
7fi
8
9SDK=`ls $1/eclipse-SDK*linux-gtk.tar.gz`
10if [ ! -r $SDK ]
11then
12 echo "Can't read SDK from $SDK"
13 exit 1
14fi
15
Stephan Herrmanna53f6d32011-03-30 01:14:24 +000016PDEBUILD=eclipse/plugins/org.eclipse.pde.build_.*/about.html
17LAUNCHER=eclipse/plugins/org.eclipse.equinox.launcher_
18JDTFEATURE=eclipse/features/org.eclipse.jdt_.*/feature.xml
Stephan Herrmanna53f6d32011-03-30 01:14:24 +000019
Stephan Herrmanne1aaa442012-06-02 22:15:06 +020020for VERSION in `tar tzvf $SDK | egrep "${PDEBUILD}|${LAUNCHER}|${JDTFEATURE}" | sed -e "s#.*eclipse/[^/]*/\([^/]*\).*#\1#"`
21do
22 case $VERSION in
23 org.eclipse.pde.build*)
24 PDEBUILD_VERSION=$VERSION
25 ;;
26 org.eclipse.jdt*)
27 JDT_VERSION_ALL=`echo $VERSION|grep jdt | sed -e 's/org.eclipse.jdt_\(.*\)/\1/'`
28 JDT_VERSIONA=`echo ${JDT_VERSION_ALL}| sed -e 's/\([0-9]\.[0-9]\.[0-9]\.[^-]*-\)[0-9]\{4\}.*/\1/'`
29 JDT_VERSIONB=`echo ${JDT_VERSION_ALL}| sed -e 's/[0-9]\.[0-9]\.[0-9]\.[^-]*-\([0-9]\{4\}\).*/\1/'`
30 JDT_VERSIONB_NEXT=`expr $JDT_VERSIONB + 1`
31 ;;
32 org.eclipse.equinox.launcher*)
33 LAUNCHER_VERSION=$VERSION
34 ;;
35 esac
36done
37
38echo "Versions for run.properties:"
39echo "============================"
Stephan Herrmanna2c83a52012-09-22 00:07:54 +020040echo "# Details of the Eclipse SDK built upon:"
Stephan Herrmanne1aaa442012-06-02 22:15:06 +020041echo "run.eclipseScriptDir=plugins/${PDEBUILD_VERSION}/scripts"
42echo "org.eclipse.equinox.launcher_jar=${LAUNCHER_VERSION}"
43echo
44echo "# for patching our patch feature to match this version with any suffix:"
45echo "jdt.feature.version=${JDT_VERSIONA}${JDT_VERSIONB}"
46echo "jdt.feature.version.next=${JDT_VERSIONA}${JDT_VERSIONB_NEXT}"
47
48echo
49echo "Version for org.eclipse.objectteams.otdt.core.patch.feature:"
50echo "============================================================"
51echo " <import feature=\"org.eclipse.jdt\" version=\"${JDT_VERSION_ALL}\" patch=\"true\"/>"
52
Stephan Herrmanne1aaa442012-06-02 22:15:06 +020053
54echo "==================================="
Stephan Herrmanna53f6d32011-03-30 01:14:24 +000055