#!/bin/sh -e

# $2 = version
DIR=libslf4j-java-$2.orig

# clean up the upstream tarball
tar -z -x -f $3
mv slf4j-$2 $DIR
GZIP=--best tar -c -z -f $3 --exclude '*.jar' --exclude '*/site*' --exclude '*/slf4j-site*' $DIR
rm -rf $DIR

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