1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#!/bin/sh
VERSION_AUTOTOOLS=$(grep ^AC_INIT configure.ac | sed -r 's/[^[]+\[([^]]+)\].+/\1/')
VERSION_DEB=`head -n 1 debian/changelog | sed -re 's/.+\(([^-]+).+/\1/'`
VERSION="$VERSION_AUTOTOOLS"
if [ "$VERSION_AUTOTOOLS" != "$VERSION_DEB" ]
then
echo "Version mismatch between autotools ($VERSION_AUTOTOOLS) and debian/changelog ($VERSION_DEB)" >&2
exit 1
fi
if [ z"$1" = z"need-orig" ]
then
DEST=../tagcoll2_$VERSION.orig.tar.gz
if ! [ -f $DEST ]
then
test -f Makefile || ./configure
make dist
mv tagcoll2-$VERSION.tar.gz $DEST
fi
else
echo "$VERSION"
fi
exit 0
|