#!/bin/sh -e

# $2 = version
# $3 = file
TAR=../jajuk_$2.orig.tar.xz
DIR=jajuk-$2.orig

# clean up the upstream tarball
unzip $3
mv jajuk-src-* $DIR
XZ_OPT=--best tar -c -J -f $TAR -X debian/orig-tar.exclude $DIR
rm -rf $DIR

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

exit 0
