#!/bin/sh -e

VERSION=$2
TAR=../libxml-security-java_$VERSION.orig.tar.gz
DIR=libxml-security-java-$VERSION
TAG="$VERSION"

svn export http://svn.apache.org/repos/asf/santuario/xml-security-java/tags/${TAG}/ $DIR
tar -c -z -f $TAR --exclude '*.jar' $DIR
rm -rf $DIR ../$TAG

# move to directory 'tarballs'
if [ -r .svn/deb-layout ]; then
  . .svn/deb-layout
  mv $TAR $origDir && echo "moved $TAR to $origDir"
fi
