File: generate-version.sh

package info (click to toggle)
babeld 1.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 644 kB
  • sloc: ansic: 11,136; sh: 109; makefile: 44
file content (13 lines) | stat: -rwxr-xr-x 229 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

set -e

if [ -d .git ] && [ "$(git tag)" ] ; then
    version="$(git describe --dirty)"
elif [ -f version ] ; then
    version="$(cat version)"
else
    version="unknown"
fi

echo "#define BABELD_VERSION \"$version\""