#!/bin/sh
# get source for jam-lib from SVN

NAME=jam-lib

rm -f ../detail
mkdir -p ../tarballs
cd ../tarballs
# svn export concerves time stamps of the files, checkout does not
REV=`LC_ALL=C svn export http://${NAME}.googlecode.com/svn/trunk/ ${NAME} | tail -n 1 | sed 's/^.*revision \([0-9]\+\)./\1/'`
VERSION=0.0.r${REV}

find ${NAME} -name .svn -type d -exec rm -rf \{\} \;
rm -f ${NAME}/lib/*.jar

GZIP="--best --no-name" tar -caf "$NAME"_"$VERSION".orig.tar.xz "${NAME}"
rm -rf "${NAME}"
