Blob Blame Raw
set -e

rm -rf R4_platform-aggregator-$TAG
rm -rf R4_platform-aggregator-$TAG.tar.xz

# adding --depth 1 here may result in a quicker clone, but did not work for me
git clone --branch $TAG  $AGGREGATOR_PATH R4_platform-aggregator-$TAG

pushd R4_platform-aggregator-$TAG

git submodule init
git submodule update

rm -rf bootstrap devutils streams scripts

# Comment this line to get a shallow clone.
find . -type d -name ".git" | xargs rm -rf

# Delete pre-built binary artifacts except some test data that cannot be generated
find . ! -path "*/JCL/*" \
   -type f -name *.jar -delete
find . -type f -name *.class -delete
find . -type f -name *.so -delete
find . -type f -name *.dll -delete
find . -type f -name *.jnilib -delete
find . -type f -name *.exe -delete
# Remove pre-compiled native launchers
rm -rf rt.equinox.binaries/org.eclipse.equinox.executable/{bin,contributed}/


tar cJf R4_platform-aggregator-$TAG.tar.xz R4_platform-aggregator-$TAG