#!/bin/sh -e

TAR=../maven-embedder_$2.orig.tar.gz
DIR=maven-embedder-$2
TAG=maven-embedder-$2

svn export http://svn.apache.org/repos/asf/maven/components/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
