#!/bin/sh

set -e

# called by uscan with '--upstream-version' <version> <file>
DIR=guice-$2
TAR=guice_$2.orig.tar.xz

# Repack upstream source to tar.xz
unzip $3
mv guice-$2-src $DIR
XZ_OPT=--best tar cJf $TAR -X debian/orig-tar.exclude $DIR
rm -rf $DIR $3
