#!/bin/sh -e

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

TAR=../libflickrnet_$1.orig.tar.gz
DIR=libflickrnet-$1
ZIP=FlickrNet-$1.zip

# clean up the upstream tarball
unzip $ZIP -d $DIR
tar -c -z -f $TAR $DIR
rm -rf $DIR $ZIP

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

exit 0
