Changed hardkey ids to start from 1
[irreco.git] / script / versioncheck.sh
blobf431f5aecc1b25154e6b189acd80c53c82c71a36
1 #!/bin/bash
3 cd `dirname "$0"`
4 source variables.sh
6 echo ""
7 echo " Check versions match in configure.ac, ChangeLog and /debian/changelog"
8 echo ""
10 # Check all version numbers match
11 REGEX='AC_INIT\(\[irreco\], \[(.*)\]\)'
12 VERSION_CONFIGURE=$(egrep -o '^'"$REGEX"'$' ../irreco/configure.ac | sed -r "s|$REGEX|\1|")
13 check_exit_code "$?"
14 if [[ "$VERSION_CONFIGURE" == "" ]]; then
15 echo "Could not get version number."
16 exit 1
19 head ../irreco/ChangeLog -n 1 | grep "$VERSION_CONFIGURE" > /dev/null
20 check_exit_code "$?" "Version numbers dont match in ./ChangeLog and ./irreco/configure.ac"
22 head ../irreco/debian/changelog -n 1 | grep "$VERSION_CONFIGURE" > /dev/null
23 check_exit_code "$?" "Version numbers dont match in ./debian/changelog and ./irreco/configure.ac"
25 #head ../irreco/debian/changelog -n 1 | egrep '\([0-9.]+-(pre)*[0-9]+\)' > /dev/null
26 check_exit_code "$?" "Version number in ./debian/changelog must be in"\
27 "the form (__SRC_VERSION__-__DEB_VERSION__). For example (0.5.6-1)."
29 echo " Version check OK"
30 echo ""