#!/bin/sh
VERSION_DEBTAGS=$(sed -nre 's/^VERSION = "([^"]+)"/\1/p' debtags)
VERSION_DEB=`head -n 1 debian/changelog  | sed -re 's/.+\(([^)]+).+/\1/'`
VERSION="$VERSION_DEBTAGS"

if [ "$VERSION_DEBTAGS" != "$VERSION_DEB" ]
then
	echo "Version mismatch between debtags ($VERSION_DEBTAGS) and debian/changelog ($VERSION_DEB)" >&2
	exit 1
fi

exit 0
