File: vercheck

package info (click to toggle)
apt-xapian-index 0.45
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 428 kB
  • sloc: python: 2,949; ruby: 475; sh: 130; makefile: 34
file content (20 lines) | stat: -rwxr-xr-x 627 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
VERSION_SRC1=`grep ^VERSION= update-apt-xapian-index | sed -re 's/^.+"([^"]+)".*/\1/'`
VERSION_SRC2=`grep ^VERSION= axi-cache | sed -re 's/^.+"([^"]+)".*/\1/'`
VERSION_DEB=`head -n 1 debian/changelog | sed -re 's/[^(]+\(([^)]+)\).+/\1/'`
VERSION="$VERSION_SRC1"

if [ "$VERSION_SRC1" != "$VERSION_DEB" ]
then
	echo "Version mismatch between update-a-x-i source ($VERSION_SRC1) and debian/changelog ($VERSION_DEB)" >&2
	exit 1
fi

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

echo "$VERSION"
exit 0