Ticket #1754: 0001-fwmod-Identify-SVN_VERSION-when-you-cloned-from-Git-.patch

Datei 0001-fwmod-Identify-SVN_VERSION-when-you-cloned-from-Git-.patch, 1.0 KB (hinzugefügt von dileks, vor 6 Jahren)

[PATCH] fwmod: Identify SVN_VERSION when you cloned from Git repository

  • fwmod

    From f502d1f5ecbbb733ece9784b0946779ef4ca9a17 Mon Sep 17 00:00:00 2001
    From: Sedat Dilek <sedat.dilek@gmail.com>
    Date: Tue, 27 Mar 2012 18:10:06 +0200
    Subject: [PATCH] fwmod: Identify SVN_VERSION when you cloned from Git
     repository
    
    For details see <http://freetz.org/wiki/common/source_code>
    
    Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
    ---
     fwmod |    6 ++++++
     1 files changed, 6 insertions(+), 0 deletions(-)
    
    diff --git a/fwmod b/fwmod
    index c4776b6..66750df 100755
    a b if [ "$DO_MOD" -gt 0 ]; then 
    688688            [ "${SVN_VERSION:0:6}" == "export" ] && SVN_VERSION="" 
    689689            [ "$SVN_VERSION" != "" ] && SVN_VERSION="-$SVN_VERSION" 
    690690        fi 
     691        # Identify SVN_VERSION when you cloned from 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 -1 | grep git-svn-id | cut -d '@' -f 2 | cut -d ' ' -f 1) 
     695            SVN_VERSION="-$SVN_VERSION" 
     696        fi 
    691697    fi 
    692698 
    693699    SUBVERSION="$(cat $SUBVERSION_FILE)${SVN_VERSION}"