| #!/bin/sh |
| # |
| # script to update PTP versions |
| # |
| # Usage: update_versions version |
| # |
| # version - new version string (e.g. "3.0.1") |
| # |
| # Note: a "qualifier" suffix will automatically be added to the version where appropriate |
| # |
| |
| TMP_DIR=/tmp |
| |
| if [ $# -lt 1 ]; then |
| echo "usage: update_versions version" |
| exit 1 |
| fi |
| |
| version=$1 |
| |
| FEATURES="\ |
| org.eclipse.ptp-feature \ |
| org.eclipse.ptp.core-feature \ |
| org.eclipse.ptp.external-feature \ |
| org.eclipse.ptp.master \ |
| org.eclipse.ptp.etfw-feature \ |
| org.eclipse.ptp.etfw.tau-feature \ |
| org.eclipse.ptp.etfw.tau.fortran-feature \ |
| org.eclipse.ptp.pldt-feature \ |
| org.eclipse.ptp.pldt.lapi-feature \ |
| org.eclipse.ptp.pldt.upc-feature \ |
| org.eclipse.ptp.rdt-feature \ |
| org.eclipse.ptp.rdt.xlc-feature \ |
| org.eclipse.ptp.remote-feature \ |
| org.eclipse.ptp.remote.remotetools-feature \ |
| org.eclipse.ptp.remote.rse-feature \ |
| org.eclipse.ptp.remotetools-feature \ |
| org.eclipse.ptp.rm.ibm.ll-feature \ |
| org.eclipse.ptp.rm.ibm.pe-feature \ |
| org.eclipse.ptp.rm.mpich2-feature \ |
| org.eclipse.ptp.rm.openmpi-feature \ |
| org.eclipse.ptp.sdm-feature \ |
| org.eclipse.ptp.services-feature \ |
| org.eclipse.ptp.utils-feature" |
| |
| PLUGINS="\ |
| org.eclipse.ptp.aix.ppc \ |
| org.eclipse.ptp.linux.ppc \ |
| org.eclipse.ptp.linux.x86 \ |
| org.eclipse.ptp.linux.x86_64 \ |
| org.eclipse.ptp.macosx.ppc \ |
| org.eclipse.ptp.macosx.x86 \ |
| org.eclipse.ptp" |
| |
| C_PROJECTS="\ |
| org.eclipse.ptp.debug.sdm \ |
| org.eclipse.ptp.proxy \ |
| org.eclipse.ptp.utils" |
| |
| update_feature() { |
| sed -e "s/version=\"[0-9]\.[0-9]\.[0-9]\.qualifier\"/version=\"$2\.qualifier\"/" < $1/feature.xml > $TMP_DIR/${1}_feature.xml |
| mv $TMP_DIR/${1}_feature.xml $1/feature.xml |
| } |
| |
| update_manifest() { |
| sed -e "s/Bundle-Version: *[0-9]\.[0-9]\.[0-9]\.qualifier/Bundle-Version: $2.qualifier/" < $1/META-INF/MANIFEST.MF > $TMP_DIR/${1}_MANIFEST.MF |
| mv $TMP_DIR/${1}_MANIFEST.MF $1/META-INF/MANIFEST.MF |
| } |
| |
| update_configure() { |
| sed -e "s/AC_INIT(\([^,]*\), *[0-9]\.[0-9]\.[0-9])/AC_INIT(\1, $2)/" < $1/configure.in > $TMP_DIR/${1}_configure.in |
| mv $TMP_DIR/${1}_configure.in $1/configure.in |
| (cd $1; autoconf) |
| } |
| |
| for feature in $FEATURES; do |
| echo "Updating $feature..." |
| update_feature $feature $version |
| done |
| |
| for plugin in $PLUGINS; do |
| echo "Updating $plugin..." |
| update_manifest $plugin $version |
| done |
| |
| for project in $C_PROJECTS; do |
| echo "Updating $project..." |
| update_manifest $project $version |
| update_configure $project $version |
| done |
| |
| echo "Updating org.eclipse.ptp.releng..." |
| sed -e "s/<property name=\"branchVersion\" value=\"[0-9]\.[0-9]\.[0-9]\"\/>/<property name=\"branchVersion\" value=\"$version\"\/>/" < org.eclipse.ptp.releng/build.xml > $TMP_DIR/org.eclipse.ptp.releng_build.xml |
| mv $TMP_DIR/org.eclipse.ptp.releng_build.xml org.eclipse.ptp.releng/build.xml |
| |
| echo "Updating org.eclipse.ptp.rdt.core.remotejars..." |
| sed -e "s/<property name=\"ptpVersion\" value=\"[0-9]\.[0-9]\.[0-9]\"\/>/<property name=\"ptpVersion\" value=\"$version\"\/>/" < org.eclipse.ptp.rdt.core.remotejars/build.xml > $TMP_DIR/org.eclipse.ptp.rdt.core.remotejars_build.xml |
| mv $TMP_DIR/org.eclipse.ptp.rdt.core.remotejars_build.xml org.eclipse.ptp.rdt.core.remotejars/build.xml |
| |
| exit 0 |