summaryrefslogtreecommitdiff
path: root/debian/check_versions
blob: aca46c5428d54b827a480714087b7657a40e4ba9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

DEB_VERSION=$(head -1 debian/changelog | sed -re 's/[^(]+\(([^)]+)\).+/\1/')
DEB_UPSTREAM_VERSION=$(echo $DEB_VERSION | sed -r 's/-.+//')
CMAKE_VERSION=$(grep '^set( *EPT_VERSION' CMakeLists.txt |sed -r 's/.+"([^"]+)".+/\1/')

if [ "$DEB_UPSTREAM_VERSION" != "$CMAKE_VERSION" ]
then
	echo "Version mismatch between ($DEB_UPSTREAM_VERSION) and CMakeLists.txt ($CMAKE_VERSION)" >&2
	exit 1
fi

#echo $DEB_VERSION
#echo $CMAKE_VERSION

exit 0