#!/bin/sh -e

VERSION=$2
TAR=../saxonhe_$VERSION+dfsg.orig.tar.xz
DIR=saxonhe-$VERSION
TAG="$VERSION"

svn -q export https://www.saxonica.co.uk/repos/archive/opensource/tags/${TAG}/hej/net $DIR
XZ_OPT=--best tar cJf $TAR --exclude 'sf/saxon/dotnet' --exclude 'sf/saxon/option' --exclude 'sf/saxon/xqj' $DIR
rm -rf $DIR ../$TAG
