#! /bin/sh

package=zegrapher
version=$2

debian_orig_tgz=${package}_${version}.orig.tar.gz
debian_newdir=${package}-${version}
upstream_archive=ZeGrapher_v${version}_Sources.7z
upstream_newdir="ZeGrapher v${version} Sources"
cd ..
7z x ${upstream_archive}
mv "${upstream_newdir}" ${debian_newdir}
tar czf ${debian_orig_tgz} ${debian_newdir}

echo "Created the archive ../${debian_orig_tgz} and unrolled it to ../${debian_newdir}"

