File: Version

package info (click to toggle)
gr-framework 0.73.14%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 11,600 kB
  • sloc: ansic: 87,413; cpp: 45,348; objc: 3,057; javascript: 2,647; makefile: 1,129; python: 1,000; sh: 991; yacc: 855; pascal: 554; fortran: 228
file content (10 lines) | stat: -rwxr-xr-x 378 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
#!/bin/sh
tags=`git describe 2>/dev/null || cat version.txt`
version=`echo ${tags} | awk -F- '{print $1}' | sed 's/^v//'`
commits=`echo ${tags} | awk -F- '{print $2}'`
sha=`echo ${tags} | awk -F- '{print $3}'`
if [ "${commits}" != "" -a "${commits}" != "0" ]
then
  version="${version}.post${commits}"
fi
printf "#ifndef GR_VERSION\n#define GR_VERSION \"${version}\"\n#endif\n"