#!/bin/sh -e

VERSION=$2
TAR=../wagon2_$VERSION.orig.tar.gz
DIR=wagon-$VERSION

tar -zxf $TAR
rm $TAR
TAR_XZ=../wagon2_$VERSION.orig.tar.xz
tar -c -J -f $TAR_XZ -X debian/orig-tar.exclude $DIR
rm -rf $DIR
