#!/bin/sh

git clone https://github.com/fhcrc/microbiome-demo.git data
find . -name '.git*' | xargs rm -rf
cd data
rm -rf $(ls -A | grep -vE "(src)|(vaginal_16s.refpkg)")
cd ..
tarball=$(dpkg-parsechangelog --file ../changelog | awk '/^Source:/ {print $2}')_$(dpkg-parsechangelog --file ../changelog | awk '/^Version:/ {print $2}' | cut -f1 -d-).orig-debian-tests-data.tar.gz
tar --owner=root --group=root --mode=a+rX -cvzSf $tarball data
rm -rf data.zip data/
echo "Now move $tarball next to the new upstream tarball and gbp import it as usual"

