#!/bin/sh -e

# called by uscan with '--upstream-version' <version> <file>
TAR=../gaviotatb_$2.orig.tar.gz
DIR=gaviotatb-$2.orig

# clean up the upstream tarball
unzip $3
mv michiguel-Gaviota-Tablebases-* $DIR
rm -rf $DIR/compression/zlib
GZIP=--best tar -c -z -f $TAR $DIR
rm -rf $3 $DIR
