7c442c1
#!/bin/bash
7c442c1
set -e
7c442c1
AGGREGATOR_PATH=git://git.eclipse.org/gitroot/platform/eclipse.platform.releng.aggregator.git
7c442c1
TAG=S4_7_3_aRC2
7c442c1
7c442c1
rm -rf R4_platform-aggregator-$TAG
7c442c1
rm -rf R4_platform-aggregator-$TAG.tar.xz
7c442c1
7c442c1
git clone --recursive -j2 --branch $TAG $AGGREGATOR_PATH R4_platform-aggregator-$TAG
7c442c1
7c442c1
pushd R4_platform-aggregator-$TAG
7c442c1
7c442c1
rm -rf production
7c442c1
7c442c1
# Comment this line to get a shallow clone.
7c442c1
find . -type d -name ".git" | xargs rm -rf
7c442c1
7c442c1
# Delete pre-built binary artifacts except some test data that cannot be generated
7c442c1
find . ! -path "*/JCL/*" ! -name "rtstubs*.jar" ! -name "java10api.jar" \
7c442c1
   -type f -name *.jar -delete
7c442c1
find . -type f -name *.class -delete
7c442c1
find . -type f -name *.so -delete
7c442c1
find . -type f -name *.dll -delete
7c442c1
find . -type f -name *.jnilib -delete
7c442c1
# Remove pre-compiled native launchers
7c442c1
rm -rf rt.equinox.binaries/org.eclipse.equinox.executable/{bin,contributed}/
7c442c1
7c442c1
popd 
7c442c1
7c442c1
tar cJf R4_platform-aggregator-$TAG.tar.xz R4_platform-aggregator-$TAG