Debian Codegraph @

debian/vercheck

raw
1 #!/bin/sh
2 VERSION_SRC1=`grep ^VERSION= update-apt-xapian-index | sed -re 's/^.+"([^"]+)".*/\1/'`
3 VERSION_SRC2=`grep ^VERSION= axi-cache | sed -re 's/^.+"([^"]+)".*/\1/'`
4 VERSION_DEB=`head -n 1 debian/changelog | sed -re 's/[^(]+\(([^)]+)\).+/\1/'`
5 VERSION="$VERSION_SRC1"
6
7 if [ "$VERSION_SRC1" != "$VERSION_DEB" ]
8 then
9 echo "Version mismatch between update-a-x-i source ($VERSION_SRC1) and debian/changelog ($VERSION_DEB)" >&2
10 exit 1
11 fi
12
13 if [ "$VERSION_SRC2" != "$VERSION_DEB" ]
14 then
15 echo "Version mismatch between axi-cache source ($VERSION_SRC2) and debian/changelog ($VERSION_DEB)" >&2
16 exit 1
17 fi
18
19 echo "$VERSION"
20 exit 0