#!/bin/sh -e

# called by uscan with '--upstream-version' <version> <file>
DIR=model-builder-$2.orig

# remove pds without source
tar -z -x -f $3
mv Model-Builder-$2 $DIR
(cd $DIR; rm model_builder/Docs/Quick-start.pdf)
tar -c -z -f $3 $DIR
rm -rf $DIR

# move to directory 'tarballs'
if [ -r .svn/deb-layout ]; then
  . .svn/deb-layout
  mv $3 $origDir
  echo "moved $3 to $origDir"
fi
