#!/bin/sh

set -e

TAR=../surefire_$2.orig.tar.gz
DIR=surefire-$2
TAG=surefire-$2

svn export http://svn.apache.org/repos/asf/maven/surefire/tags/$TAG $DIR
tar -c -z -f $TAR $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
