File: vercheck

package info (click to toggle)
tagcoll2 2.0.14-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 2,520 kB
  • ctags: 1,625
  • sloc: sh: 11,709; cpp: 6,201; makefile: 196; ansic: 74; lex: 54; yacc: 27
file content (25 lines) | stat: -rwxr-xr-x 581 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
VERSION_AUTOTOOLS=$(grep ^AC_INIT configure.ac | sed -r 's/[^[]+\[([^]]+)\].+/\1/')
VERSION_DEB=`head -n 1 debian/changelog  | sed -re 's/.+\(([^-]+).+/\1/'`
VERSION="$VERSION_AUTOTOOLS"

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

if [ z"$1" = z"need-orig" ]
then
	DEST=../tagcoll2_$VERSION.orig.tar.gz
	if ! [ -f $DEST ]
	then
		test -f Makefile || ./configure
		make dist
		mv tagcoll2-$VERSION.tar.gz $DEST
	fi
else
	echo "$VERSION"
fi

exit 0