blob: d2fe8958872fcbc5a24fda2c964dbc1ee3d42d75 [file] [log] [blame]
#!/bin/sh
if [ ! -d $1 ]
then
echo "Not a directory: $1"
exit 1
fi
SDK=`ls $1/eclipse-SDK*linux-gtk.tar.gz`
if [ ! -r $SDK ]
then
echo "Can't read SDK from $SDK"
exit 1
fi
PDEBUILD=eclipse/plugins/org.eclipse.pde.build_.*/about.html
LAUNCHER=eclipse/plugins/org.eclipse.equinox.launcher_
JDTFEATURE=eclipse/features/org.eclipse.jdt_.*/feature.xml
JDT_COMPILER_APT=eclipse/plugins/org.eclipse.jdt.compiler.apt_
JDT_COMPILER_TOOL=eclipse/plugins/org.eclipse.jdt.compiler.tool_
for VERSION in `tar tzvf $SDK | egrep "${PDEBUILD}|${LAUNCHER}|${JDTFEATURE}|${JDT_COMPILER_APT}|${JDT_COMPILER_TOOL}" | sed -e "s#.*eclipse/[^/]*/\([^/]*\).*#\1#"`
do
case $VERSION in
org.eclipse.pde.build*)
PDEBUILD_VERSION=$VERSION
;;
org.eclipse.jdt.compiler.apt*)
JDT_COMPILER_APT_VERSION=$VERSION
;;
org.eclipse.jdt.compiler.tool*)
JDT_COMPILER_TOOL_VERSION=$VERSION
;;
org.eclipse.jdt*)
JDT_VERSION_ALL=`echo $VERSION|grep jdt | sed -e 's/org.eclipse.jdt_\(.*\)/\1/'`
JDT_VERSIONA=`echo ${JDT_VERSION_ALL}| sed -e 's/\([0-9]\.[0-9]*\.[0-9]\.[^-]*-\)[0-9]\{4\}.*/\1/'`
JDT_VERSIONB=`echo ${JDT_VERSION_ALL}| sed -e 's/[0-9]\.[0-9]*\.[0-9]\.[^-]*-\([0-9]\{4\}\).*/\1/'`
JDT_VERSIONB_NEXT=`expr $JDT_VERSIONB + 1`
;;
org.eclipse.equinox.launcher*)
LAUNCHER_VERSION=$VERSION
;;
esac
done
echo "Versions for run.properties:"
echo "============================"
echo "# Details of the Eclipse SDK built upon:"
echo "run.eclipseScriptDir=plugins/${PDEBUILD_VERSION}/scripts"
echo "org.eclipse.equinox.launcher_jar=${LAUNCHER_VERSION}"
echo
echo "# for patching our patch feature to match this version with any suffix:"
echo "jdt.feature.version=${JDT_VERSIONA}${JDT_VERSIONB}"
echo "jdt.feature.version.next=${JDT_VERSIONA}${JDT_VERSIONB_NEXT}"
echo
echo "# jdt.core fragments for extracting pre-built classes and properties:"
echo "jdt.compiler.apt=${JDT_COMPILER_APT_VERSION}"
echo "jdt.compiler.tool=${JDT_COMPILER_TOOL_VERSION}"
echo "============================"
echo
echo "Version for org.eclipse.objectteams.otdt.core.patch.feature:"
echo "============================================================"
echo " <import feature=\"org.eclipse.jdt\" version=\"${JDT_VERSION_ALL}\" patch=\"true\"/>"
echo "==================================="