#!/bin/sh -e

# $1 = version
TAR=../libjboss-xml-binding-java_$2.orig.tar.gz
DIR=libjboss-xml-binding-java-$2.orig

# clean up the upstream tarball
svn export http://anonsvn.jboss.org/repos/common/jbossxb/tags/$2/ $DIR
GZIP=--best tar -c -z -f $TAR $DIR
rm -rf $DIR
rm ../$2

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