From: Dennis Schafroth Date: Wed, 7 Mar 2012 11:11:30 +0000 (+0100) Subject: Simple check that IDMETA and deb has same version X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=d7d0bf7d6e4b45df1c38e99de596a467c6ecc642;p=git-tools-moved-to-github.git Simple check that IDMETA and deb has same version --- diff --git a/id-deb-build/check-for-dummies.sh b/id-deb-build/check-for-dummies.sh new file mode 100644 index 0000000..d40ef11 --- /dev/null +++ b/id-deb-build/check-for-dummies.sh @@ -0,0 +1,27 @@ +#!/bin/sh +DEBCHANGELOG=debian/changelog +if test ! -f $DEBCHANGELOG; then + echo "$DEBCHANGELOG missing" + echo "The current directory should be base source of package" + exit 1 +fi +l=`head -1 $DEBCHANGELOG` +PROD=`echo $l|sed 's/ .*//g'` +DEB_VERSION=`echo $l|sed 's/.*(//g'|sed 's/).*//g'` +echo "VERSION=$DEB_VERSION" +MAJOR=`echo $DEB_VERSION|sed 's/-.*//g'` +echo "MAJOR=$MAJOR" +MINOR=`echo $DEB_VERSION|sed 's/.*-//g'` +echo "MINOR=$MINOR" + +. IDMETA + +if [ "$VERSION" != "$MAJOR" ] ; then + echo "$VERSION != $MAJOR" + exit 1; +fi +# Local Variables: +# mode:shell-script +# sh-indentation: 2 +# sh-basic-offset: 8 +# End: