#!/bin/sh

set -e

PACKAGE=libgoogle-gson-java
VERSION=$2
TAR=../${PACKAGE}_${VERSION}.orig.tar.gz
DIR=google-gson
SVNROOT=http://google-gson.googlecode.com/svn/tags/gson-$VERSION

rm $3
svn export $SVNROOT $DIR
GZIP=--best tar --exclude $DIR/docs/javadocs -zcf $TAR $DIR
rm -rf $DIR
