blob: d2fe8958872fcbc5a24fda2c964dbc1ee3d42d75 [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 Herrmann25ac9532016-11-10 22:04:40 +010019JDT_COMPILER_APT=eclipse/plugins/org.eclipse.jdt.compiler.apt_
20JDT_COMPILER_TOOL=eclipse/plugins/org.eclipse.jdt.compiler.tool_
Stephan Herrmanna53f6d32011-03-30 01:14:24 +000021
Stephan Herrmann25ac9532016-11-10 22:04:40 +010022for VERSION in `tar tzvf $SDK | egrep "${PDEBUILD}|${LAUNCHER}|${JDTFEATURE}|${JDT_COMPILER_APT}|${JDT_COMPILER_TOOL}" | sed -e "s#.*eclipse/[^/]*/\([^/]*\).*#\1#"`
Stephan Herrmanne1aaa442012-06-02 22:15:06 +020023do
24 case $VERSION in
25 org.eclipse.pde.build*)
26 PDEBUILD_VERSION=$VERSION
27 ;;
Stephan Herrmann25ac9532016-11-10 22:04:40 +010028 org.eclipse.jdt.compiler.apt*)
29 JDT_COMPILER_APT_VERSION=$VERSION
30 ;;
31 org.eclipse.jdt.compiler.tool*)
32 JDT_COMPILER_TOOL_VERSION=$VERSION
33 ;;
Stephan Herrmanne1aaa442012-06-02 22:15:06 +020034 org.eclipse.jdt*)
35 JDT_VERSION_ALL=`echo $VERSION|grep jdt | sed -e 's/org.eclipse.jdt_\(.*\)/\1/'`
Stephan Herrmannb7a5f1d2014-11-13 17:11:30 +010036 JDT_VERSIONA=`echo ${JDT_VERSION_ALL}| sed -e 's/\([0-9]\.[0-9]*\.[0-9]\.[^-]*-\)[0-9]\{4\}.*/\1/'`
37 JDT_VERSIONB=`echo ${JDT_VERSION_ALL}| sed -e 's/[0-9]\.[0-9]*\.[0-9]\.[^-]*-\([0-9]\{4\}\).*/\1/'`
Stephan Herrmanne1aaa442012-06-02 22:15:06 +020038 JDT_VERSIONB_NEXT=`expr $JDT_VERSIONB + 1`
39 ;;
40 org.eclipse.equinox.launcher*)
41 LAUNCHER_VERSION=$VERSION
42 ;;
43 esac
44done
45
46echo "Versions for run.properties:"
47echo "============================"
Stephan Herrmanna2c83a52012-09-22 00:07:54 +020048echo "# Details of the Eclipse SDK built upon:"
Stephan Herrmanne1aaa442012-06-02 22:15:06 +020049echo "run.eclipseScriptDir=plugins/${PDEBUILD_VERSION}/scripts"
50echo "org.eclipse.equinox.launcher_jar=${LAUNCHER_VERSION}"
51echo
52echo "# for patching our patch feature to match this version with any suffix:"
53echo "jdt.feature.version=${JDT_VERSIONA}${JDT_VERSIONB}"
54echo "jdt.feature.version.next=${JDT_VERSIONA}${JDT_VERSIONB_NEXT}"
Stephan Herrmann25ac9532016-11-10 22:04:40 +010055echo
56echo "# jdt.core fragments for extracting pre-built classes and properties:"
57echo "jdt.compiler.apt=${JDT_COMPILER_APT_VERSION}"
58echo "jdt.compiler.tool=${JDT_COMPILER_TOOL_VERSION}"
59echo "============================"
Stephan Herrmanne1aaa442012-06-02 22:15:06 +020060
61echo
62echo "Version for org.eclipse.objectteams.otdt.core.patch.feature:"
63echo "============================================================"
64echo " <import feature=\"org.eclipse.jdt\" version=\"${JDT_VERSION_ALL}\" patch=\"true\"/>"
65
Stephan Herrmanne1aaa442012-06-02 22:15:06 +020066
67echo "==================================="
Stephan Herrmanna53f6d32011-03-30 01:14:24 +000068