source: trunk/softs/tsar_boot/version.sh @ 514

Last change on this file since 514 was 502, checked in by bouyer, 11 years ago

Print a version string at execution, dynamically computed at link time.
The version string includes: content of ./version, builder and date,
and svn revision.
This helps to know which version we're really executing ...

  • Property svn:executable set to *
File size: 232 bytes
RevLine 
[502]1#!/bin/sh
2
3n="tsarboot"
4v=$(cat version)
5t=$(date)
6u=${USER-root}
7h=$(hostname)
8svnrev=$(svn info | awk -F: '$1 == "Last Changed Rev" {print $2}')
9
10echo 'const char versionstr[]="'$n $v "($u@$h $t)" "(svn revision $svnrev)"'\n\r";'
Note: See TracBrowser for help on using the repository browser.