File: compileinfo.sh

package info (click to toggle)
guymager 0.8.13-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,768 kB
  • sloc: cpp: 17,479; makefile: 28; sh: 22
file content (14 lines) | stat: -rwxr-xr-x 869 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

echo '// Automatically generated file. See project file and compileinfo.sh for further information.'
date --utc '+const char *pCompileInfoTimestampBuild     = "%Y-%m-%d-%H.%M.%S UTC";' -d "$(dpkg-parsechangelog -S Date)"
date --utc '+const char *pCompileInfoTimestampChangelog = "%Y-%m-%d-%H.%M.%S UTC";' -d "$(dpkg-parsechangelog -S Date)"

# Line below: changelog figures twice because subdirectory debian is missing in Sourceforge upload 
# (changelog is in source code directory there). By putting it twice, it works in any case.
head -qn 1 debian/changelog 2>/dev/null | awk '{
                                    Version = $2
                                    gsub ("\\(", "", Version)
                                    gsub ("\\)", "", Version)
                                    print "const char *pCompileInfoVersion   = \"" Version "\";"}'