| #!/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 |
| |
| for VERSION in `tar tzvf $SDK | egrep "${PDEBUILD}|${LAUNCHER}|${JDTFEATURE}" | sed -e "s#.*eclipse/[^/]*/\([^/]*\).*#\1#"` |
| do |
| case $VERSION in |
| org.eclipse.pde.build*) |
| PDEBUILD_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 "Version for org.eclipse.objectteams.otdt.core.patch.feature:" |
| echo "============================================================" |
| echo " <import feature=\"org.eclipse.jdt\" version=\"${JDT_VERSION_ALL}\" patch=\"true\"/>" |
| |
| |
| echo "===================================" |
| |