#! /bin/sh
# Build the SVN tar file from the SVN repository.
# Usage: build.svn.tarfile SVN_Directory TAR_Directory
if [ "$1"x = "x" -o "$2"x = "x" -o "$3"x = "x" ]; then
   echo "Usage: $0 Revision SVN_Directory TAR_Directory"
   echo "Example: build.svn.tar 213 ~/projects.remote/svn/trunk subversion-M3"
   exit 1
fi

set -x

VERSION=$1
REPOS=$2
BUILDDIR=$3

rm -rf $BUILDDIR
cp -r $REPOS $3
tar cfz $BUILDDIR-r$VERSION.tar.gz $BUILDDIR --exclude .svn
rm -rf $BUILDDIR
