#!/bin/sh -e

VERSION=$2
TAR=../h2database_$VERSION.orig.tar.xz
DIR=h2database-$VERSION
TAG=version-$VERSION

svn export http://h2database.googlecode.com/svn/tags/$TAG/h2 $DIR
XZ_OPT=--best tar -c -v -J -f $TAR \
    --exclude '*.jar' \
    --exclude '*.class' \
    --exclude 'service/*' \
    $DIR
rm -rf $DIR $3
