From 152ea0c04fb801dacaba4a982ac5d28eeeb47a44 Mon Sep 17 00:00:00 2001 From: Andrew Overholt Date: Aug 08 2008 13:15:51 +0000 Subject: Add missing fetch script --- diff --git a/fetch-cdt.sh b/fetch-cdt.sh new file mode 100755 index 0000000..7a5e705 --- /dev/null +++ b/fetch-cdt.sh @@ -0,0 +1,49 @@ +#!/bin/sh + +CDTTAG=cdt_5_0 +ECLIPSEBASE=$(rpm --eval %{_libdir})/eclipse + +mkdir -p temp && cd temp +mkdir -p home +rm -rf org.eclipse.cdt-releng +cvs -d:pserver:anonymous@dev.eclipse.org:/cvsroot/tools export -r $CDTTAG org.eclipse.cdt-releng/org.eclipse.cdt.releng +cd org.eclipse.cdt-releng/org.eclipse.cdt.releng/ + +# The build.xml doesn't fetch master or testing features so we must add this ourselves. +sed --in-place -e'87,87i\\t\t\n\t\t\t\n\t\t' build.xml +sed --in-place -e'87,87i\\t\t\n\t\t\t\n\t\t' build.xml +sed --in-place -e'69,69i\\t\t\n\t\t\t\n\t\t' build.xml +sed --in-place -e'69,69i\\t\t\n\t\t\t\n\t\t' build.xml + +# Remove copying of binary jar in build.xml. We remove this jar so this operation will fail. +sed --in-place -e'143,145d' build.xml + +PDEBUILDVERSION=$(ls $ECLIPSEBASE/dropins/sdk/plugins | grep pde.build_ | sed 's/org.eclipse.pde.build_//') +eclipse -nosplash -Duser.home=../../home \ + -application org.eclipse.ant.core.antRunner \ + -buildfile build.xml -DbaseLocation=$ECLIPSEBASE \ + -Dpde.build.scripts=$ECLIPSEBASE/dropins/sdk/plugins/org.eclipse.pde.build_$PDEBUILDVERSION/scripts \ + -DcdtTag=$CDTTAG \ + -DdontUnzip=true fetch + +find . -name net.*.jar -exec rm {} \; + +# Unfortunately for us, bringing in the master feature also drags in the c99 and upc features. We must +# remove them because they depend on the binary jar we just removed and build will note this, even if we +# don't build those features. +pushd results/features +rm -rf *c99* +rm -rf *upc* +popd +pushd results/plugins +rm -rf *c99* +rm -rf *upc* +popd + +# Remove optional features: c99, upc, and xlc from the master feature list. We do not package them. +pushd results/features/org.eclipse.cdt.master +sed --in-place -e "56,63d" feature.xml +sed --in-place -e "40,43d" feature.xml +popd + +cd .. && tar jcf eclipse-cdt-fetched-src-$CDTTAG.tar.bz2 org.eclipse.cdt.releng