File: version.sh

package info (click to toggle)
knxd 0.14.73-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,860 kB
  • sloc: cpp: 24,913; ansic: 4,936; pascal: 3,728; makefile: 529; sh: 297; ruby: 132; java: 65; python: 40
file content (12 lines) | stat: -rwxr-xr-x 438 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

# Sorry about the Debian nonsense in here but the build system doesn't
# patch the file early enough and overriding it is a PITA
if test -s debian/changelog && which dpkg-parsechangelog >/dev/null ; then
    dpkg-parsechangelog -SVersion | sed -e 's/.*://' -e 's/-.*//'
    exit
fi

test -d .git || exit
# git describe --tags
git log --format=format:%D | perl -ne 'next unless s#.*tag: ##; s#,.*##; next if m#/#; print; exit;'