#!/bin/sh -e

# called by uscan with '--upstream-version' <version> <file>

# clean up the upstream tarball
unzip $3
rm -rf jericho-html-$2/bin jericho-html-$2/doc jericho-html-$2/lib \
  jericho-html-$2/samples/CommandLine/bin
tar -c -z -f ../jericho-html_$2.orig.tar.gz jericho-html-$2
rm -rf jericho-html-$2 $3

# move to directory 'tarballs'
if [ -r .svn/deb-layout ]; then
  . .svn/deb-layout
  mv jericho-html_$2.orig.tar.gz $origDir
  echo "moved jericho-html_$2.orig.tar.gz to $origDir"
fi

