#!/usr/bin/env bash

VERSION=$2
ORIG_TAR=../paperwork-data-$VERSION.tar.gz
TAR=../paperwork-data-$VERSION.tar
DIR=data

mkdir -p $DIR

tar -xf $ORIG_TAR -C $DIR
rm $ORIG_TAR

tar -cf $TAR $DIR
gzip --best $TAR

rm -rf $DIR
