#!/bin/sh -e

VERSION=$2
ZIP=$3
TAR=../libisrt-java_$VERSION.orig.tar.gz
DIR=libisrt-java-$VERSION

unzip $ZIP
mv distribution $DIR
tar -c -z -f $TAR --exclude '*.jar' --exclude '*/javadoc/*' $DIR
rm -rf $DIR $ZIP

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