From: Mike Frysinger Date: Tue, 8 Apr 2008 18:00:57 +0000 (-0400) Subject: Add support for u-boot in svn and localversion-* files X-Git-Tag: v1.3.3-rc1~46 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=92bad20ad74b70adf3839df9a0a47cce000ac3d7;p=oweals%2Fu-boot.git Add support for u-boot in svn and localversion-* files Signed-off-by: Mike Frysinger --- diff --git a/tools/setlocalversion b/tools/setlocalversion index 9bbdafdb6d..bbb2ab2f71 100755 --- a/tools/setlocalversion +++ b/tools/setlocalversion @@ -22,4 +22,18 @@ if head=`git rev-parse --verify HEAD 2>/dev/null`; then | read dummy; then printf '%s' -dirty fi + + # Is this git on svn? + if git config --get svn-remote.svn.url >/dev/null; then + printf -- '-svn%s' "`git-svn find-rev $head`" + fi fi + +# Check for svn and a svn repo. +if rev=`svn info 2>/dev/null` ; then + rev=`echo "${rev}" | grep '^Revision' | awk '{print $NF}'` + printf -- '-svn%s' $rev +fi + +# Check for any localversion-* files +printf '%s' "`cat localversion-* 2>/dev/null`"