File: vercheck

package info (click to toggle)
dballe 5.18-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 8,252 kB
  • sloc: cpp: 29,311; sh: 11,475; python: 5,801; f90: 883; perl: 582; makefile: 575
file content (13 lines) | stat: -rwxr-xr-x 362 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
VERSION_SRC=`sed -nre 's/^AC_INIT\([^[]+\[([^]]+)\].+/\1/p' configure.ac`
VERSION_DEB=`sed -re 's/[^(]+\(([^-]+)-[^)]+\).+/\1/' -e 'q' debian/changelog`
VERSION="$VERSION_SRC"

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

echo "$VERSION"
exit 0