Ticket #1754: 0001-fwmod-Identify-SVN_VERSION-within-Freetz-Git-reposit.patch

Datei 0001-fwmod-Identify-SVN_VERSION-within-Freetz-Git-reposit.patch, 1.2 KB (hinzugefügt von dileks, vor 6 Jahren)

[PATCH] fwmod: Identify SVN_VERSION within Freetz Git repository

  • fwmod

    From faa2c1ead22b83ec41711eab27e50fb07227d689 Mon Sep 17 00:00:00 2001
    From: Sedat Dilek <sedat.dilek@gmail.com>
    Date: Thu, 12 Apr 2012 23:03:30 +0200
    Subject: [PATCH] fwmod: Identify SVN_VERSION within Freetz Git repository
    
    For details about Git repository see <http://freetz.org/wiki/common/source_code>.
    
    [ v3: Refresh against trunk-r8890 and rename patch ]
    [ v2: Rework identification and check first for empty string ]
    
    Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
    ---
     fwmod |    6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/fwmod b/fwmod
    index 08c479b..5c1984b 100755
    a b if [ "$DO_MOD" -gt 0 ]; then 
    688688            [ "${SVN_VERSION:0:6}" == "export" ] && SVN_VERSION="" 
    689689            [ -n "$SVN_VERSION" ] && SVN_VERSION="-$SVN_VERSION" 
    690690        fi 
     691        # Identify SVN_VERSION within Freetz Git repository 
     692        # For details see <http://freetz.org/wiki/common/source_code> 
     693        if [ -d .git ] && [ -f $(which git) ]; then 
     694            SVN_VERSION=$(git log | grep git-svn-id | head -1 | cut -d '@' -f 2 | cut -d ' ' -f 1) 
     695            [ "$SVN_VERSION" != "" ] && SVN_VERSION="-$SVN_VERSION" 
     696        fi 
    691697    fi 
    692698 
    693699    SUBVERSION="$(cat $SUBVERSION_FILE)${SVN_VERSION}"