--- /dev/null
+#!/bin/sh
+if test ! -f debian/changelog; then
+ echo "debian/changelog not found"
+ exit 1
+fi
+PRODUCT=`head -1 debian/changelog |awk '{print $1}'`
+if test ! -f IDMETA; then
+ echo "VERSION not found in current directory"
+ exit 1
+fi
+. ./IDMETA
+for f in debian/*; do
+ if test -d $f; then
+ echo "Removing $f"
+ rm -r $f
+ fi
+done
+git log >ChangeLog
+rm -f dist.tar ${PRODUCT}-*.tar.gz ${PRODUCT}-${VERSION}
+tar cv --exclude='*~' --exclude='.*' -f dist.tar *
+mkdir $PRODUCT-$VERSION
+(cd $PRODUCT-$VERSION; tar xf ../dist.tar)
+for f in .gitignore debian; do
+ (cd $PRODUCT-$VERSION; rm -fr $f)
+done
+tar zcvf $PRODUCT-$VERSION.tar.gz $PRODUCT-$VERSION
+rm -fr $PRODUCT-$VERSION dist.tar
+