#!/bin/bash
set -e
NAME="eclipse-dltk"
TAG=R5_10_0
RELENG_TAG=4469ad28b3e6ea9aa94074b242b4c45f0cdd75d7
CORE_TAG=1f1bf57e502f1c5177a05b993f5c1fd963a22f19
RUBY_TAG=f97db2f53d5e2d46dae444e44e70eafa4b0475f9
SHELL_TAG=4fa0de3a21c56bc2c60452e4bb2a19c96886678d
TCL_TAG=f0a789c268c48fc2964534e64683aced7b93cbda
mkdir -p $NAME-$TAG
pushd $NAME-$TAG
function dl() {
while [ ! -f "$1-$2.tar.xz" ] ; do
while ! wget http://git.eclipse.org/c/dltk/${1}.git/snapshot/${1}-${2}.tar.xz ; do
sleep 1
done
if ! tar xfs "$1-$2.tar.xz" ; then
rm "$1-$2.tar.xz"
else
mv "$1-$2" "$1"
fi
done
}
dl org.eclipse.dltk.releng $RELENG_TAG
dl org.eclipse.dltk.core $CORE_TAG
dl org.eclipse.dltk.ruby $RUBY_TAG
dl org.eclipse.dltk.tcl $TCL_TAG
dl org.eclipse.dltk.sh $SHELL_TAG
popd
#Remove any commited jars
find $NAME-$TAG -name *.jar -delete
find $NAME-$TAG -name *.class -delete
echo "Creating tarball '$NAME-$TAG.tar.xz'..."
rm -f $NAME-$TAG.tar.xz $NAME-$TAG/*.tar.xz
tar -caf $NAME-$TAG.tar.xz $NAME-$TAG
rm -fr $NAME-$TAG