#!/bin/sh -e

VERSION=$2
TAR=../jatl_$VERSION.orig.tar.xz

wget http://jatl.googlecode.com/archive/jatl-$VERSION.zip
unzip jatl-$VERSION.zip
rm jatl-$VERSION.zip
XZ_OPT=--best tar -c -J -f $TAR --exclude '.hg*' jatl-*
rm -rf jatl-* $3

# move to directory 'tarballs'
if [ -r .svn/deb-layout ]; then
  . .svn/deb-layout
  mv $TAR $origDir
  echo "moved $TAR to $origDir"
fi

