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

Last change on this file since 747 was 726, checked in by cfuguet, 10 years ago

tsar_boot: version.sh

  • When using git svn, display git svn info version instead of git revision hashcode
  • Property svn:executable set to *
File size: 347 bytes
RevLine 
[502]1#!/bin/sh
2
3n="tsarboot"
[702]4v=$(cat VERSION)
[502]5t=$(date)
6u=${USER-root}
7h=$(hostname)
8
[688]9reporev=$(svn info 2>/dev/null)
[726]10if [[ $? > 0 ]];
[688]11then
[726]12    reporev=$(git svn info 2>/dev/null)
[688]13fi
14
[726]15reporev=$(echo "$reporev" | awk -F: '$1 == "Last Changed Rev" {print $2}')
[566]16printf "%s" \
[726]17   "const char versionstr[]=\"$n $v ($u@$h $t) (svn revision $reporev)\n\r\";"
Note: See TracBrowser for help on using the repository browser.