Changeset 688


Ignore:
Timestamp:
May 14, 2014, 4:21:50 PM (11 years ago)
Author:
porquet
Message:

tsar_boot: improve version.sh to work with git-svn repos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/softs/tsar_boot/version.sh

    r566 r688  
    66u=${USER-root}
    77h=$(hostname)
    8 svnrev=$(svn info | awk -F: '$1 == "Last Changed Rev" {print $2}')
     8
     9reporev=$(svn info 2>/dev/null)
     10if [ $? -eq 0 ]
     11then
     12    repotype="svn"
     13    reporev=$(echo $reporev | awk -F: '$1 == "Last Changed Rev" {print $2}')
     14else
     15    repotype="git"
     16    reporev=$(git rev-parse HEAD)
     17fi
    918
    1019printf "%s" \
    11    "const char versionstr[]=\"$n $v ($u@$h $t) (svn revision $svnrev)\n\r\";"
     20   "const char versionstr[]=\"$n $v ($u@$h $t) ($repotype revision $reporev)\n\r\";"
Note: See TracChangeset for help on using the changeset viewer.