#!/bin/sh
#
# "$Id$"
#
# makesrcdist - make a source distribution of fldiff.
#

echo "Getting distribution..."

if test $# = 0; then
	echo -n "Version number for distribution? "
	read version
else
	version=$1
fi

cd /tmp

if test $version = snapshot; then
	url="https://svn.easysw.com/public/fltk/applications/trunk/fldiff"
else
	url="https://svn.easysw.com/public/fltk/applications/tags/fldiff-$version"

	svn copy https://svn.easysw.com/public/fltk/applications/trunk/fldiff/ "$url" \
		-m "Tag $version" || exit 1
fi

rm -rf fldiff-$version
svn export $url fldiff-$version
cd fldiff-$version

echo "Removing Subversion files and directories..."

rm -f makesrcdist
autoconf

cd ..

echo "Making .tar.gz distribution..."

gtar czf fldiff-$version-source.tar.gz fldiff-$version

echo "Removing distribution directory..."

rm -rf fldiff-$version

echo "Done!"

#
# End of "$Id: makesrcdist 85 2004-11-17 16:32:26Z mike $".
#
