#!/bin/sh -e

TAR=../plexus-io_$2.orig.tar.gz
DIR=plexus-io-$2
TAG=$(echo plexus-io-$2 | sed 's,~alpha,-alpha-,')

svn export http://svn.codehaus.org/plexus/plexus-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
