2012-07-26 10:25:54 +00:00
|
|
|
#!/bin/bash
|
2013-03-15 08:27:43 +00:00
|
|
|
set -e
|
2013-05-02 12:02:12 +00:00
|
|
|
AGGREGATOR_PATH=git://git.eclipse.org/gitroot/platform/eclipse.platform.releng.aggregator.git
|
2013-05-29 08:28:50 +00:00
|
|
|
TAG=fde729c719c431ab993b2e7a3070ef972140bf33
|
2012-07-26 10:25:54 +00:00
|
|
|
|
2013-05-02 12:02:12 +00:00
|
|
|
#source http://www.linuxjournal.com/content/normalizing-path-names-bash
|
|
|
|
function normalize()
|
|
|
|
{
|
|
|
|
# Remove all /./ sequences.
|
|
|
|
path=${1//\/.\//\/}
|
|
|
|
|
|
|
|
# Remove dir/.. sequences.
|
|
|
|
while [[ $path =~ ([^/][^/]*/\.\./) ]]
|
|
|
|
do
|
|
|
|
path=${path/${BASH_REMATCH[0]}/}
|
|
|
|
done
|
|
|
|
}
|
2012-07-26 10:25:54 +00:00
|
|
|
|
|
|
|
|
2012-09-19 11:20:23 +00:00
|
|
|
|
2013-05-02 12:02:12 +00:00
|
|
|
rm -rf R4_platform-aggregator-$TAG
|
|
|
|
rm -rf R4_platform-aggregator-$TAG.tar.bz2
|
2012-07-26 10:25:54 +00:00
|
|
|
|
2013-05-02 12:02:12 +00:00
|
|
|
git clone --single-branch --depth 1 $AGGREGATOR_PATH R4_platform-aggregator-$TAG
|
2012-07-26 10:25:54 +00:00
|
|
|
|
2013-05-02 12:02:12 +00:00
|
|
|
pushd R4_platform-aggregator-$TAG
|
|
|
|
|
|
|
|
git submodule init
|
|
|
|
|
|
|
|
for i in $(git submodule | sed -e 's/.* //'); do
|
|
|
|
spath=$(git config -f .gitmodules --get submodule.$i.path)
|
|
|
|
surl=git://git.eclipse.org/gitroot/platform/eclipse.platform.releng.aggregator.git/`git config -f .gitmodules --get submodule.$i.url`
|
|
|
|
normalize $surl
|
|
|
|
git clone --depth 1 $path $spath
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "Check out done"
|
|
|
|
|
|
|
|
#comment this line to get a shallow clone.
|
|
|
|
find . -type d -name ".git" | xargs rm rm -rf
|
|
|
|
|
|
|
|
find . -type f -name *.class -exec rm -rf {} \;
|
|
|
|
|
|
|
|
find . -name *.jar -type f -exec rm -rf {} \;
|
2012-07-26 10:25:54 +00:00
|
|
|
|
|
|
|
find . -type f -name *.so -exec rm -rf {} \;
|
2012-08-23 09:45:12 +00:00
|
|
|
find . -type f -name *.dll -exec rm -rf {} \;
|
|
|
|
find . -type f -name *.jnilib -exec rm -rf {} \;
|
2013-05-02 12:02:12 +00:00
|
|
|
|
2012-09-19 11:20:23 +00:00
|
|
|
popd
|
2013-05-02 12:02:12 +00:00
|
|
|
|
|
|
|
tar cjf R4_platform-aggregator-$TAG.tar.bz2 R4_platform-aggregator-$TAG
|