Krzysztof Daniel 594dc7c
#!/bin/bash
Krzysztof Daniel 5dda4fa
set -e
Krzysztof Daniel 5eaee80
AGGREGATOR_PATH=git://git.eclipse.org/gitroot/platform/eclipse.platform.releng.aggregator.git
30b23e4
TAG=I20140401-1500
Krzysztof Daniel 0548478
Krzysztof Daniel 5eaee80
rm -rf R4_platform-aggregator-$TAG
Krzysztof Daniel 781979c
rm -rf R4_platform-aggregator-$TAG.tar.xz
Krzysztof Daniel 594dc7c
Mat Booth f0d416f
# adding --depth 1 here may result in a quicker clone, but did not work for me
Mat Booth f0d416f
git clone --branch $TAG  $AGGREGATOR_PATH R4_platform-aggregator-$TAG
Mat Booth f0d416f
Krzysztof Daniel 594dc7c
Krzysztof Daniel 5eaee80
pushd R4_platform-aggregator-$TAG
Krzysztof Daniel 5eaee80
Krzysztof Daniel 5eaee80
git submodule init
Krzysztof Daniel 781979c
git submodule update
Krzysztof Daniel 5eaee80
Krzysztof Daniel 5eaee80
Krzysztof Daniel 5eaee80
#comment this line to get a shallow clone.
Krzysztof Daniel 5eaee80
find . -type d -name ".git" | xargs rm rm -rf 
Krzysztof Daniel 5eaee80
Krzysztof Daniel 5eaee80
find . -type f -name *.class -exec rm -rf {} \;
Krzysztof Daniel 5eaee80
Krzysztof Daniel 5eaee80
find . -name *.jar -type f -exec rm -rf {} \;
Krzysztof Daniel 594dc7c
Krzysztof Daniel 594dc7c
find . -type f -name *.so -exec rm -rf {} \;
Krzysztof Daniel 286cbad
find . -type f -name *.dll -exec rm -rf {} \;
Krzysztof Daniel 286cbad
find . -type f -name *.jnilib -exec rm -rf {} \;
Krzysztof Daniel 5eaee80
Krzysztof Daniel 0548478
popd 
Krzysztof Daniel 5eaee80
Mat Booth f0d416f
tar cJf R4_platform-aggregator-$TAG.tar.xz R4_platform-aggregator-$TAG