public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] Add support for u-boot in svn and localversion-* files
@ 2008-01-26 10:45 Mike Frysinger
  2008-04-08 18:00 ` Mike Frysinger
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Frysinger @ 2008-01-26 10:45 UTC (permalink / raw)
  To: u-boot


Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 tools/setlocalversion |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/tools/setlocalversion b/tools/setlocalversion
index 9a23825..5ff7f2e 100755
--- a/tools/setlocalversion
+++ b/tools/setlocalversion
@@ -19,4 +19,18 @@ if head=`git rev-parse --verify HEAD 2>/dev/null`; then
 	if git diff-files | 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`"
-- 
1.5.3.8

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-04-20  6:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-26 10:45 [U-Boot-Users] [PATCH] Add support for u-boot in svn and localversion-* files Mike Frysinger
2008-04-08 18:00 ` Mike Frysinger
2008-04-08 21:04   ` Wolfgang Denk
2008-04-08 21:19     ` Ben Warren
2008-04-08 21:49       ` Kumar Gala
2008-04-09 17:45         ` Jean-Christophe PLAGNIOL-VILLARD
2008-04-09 18:06           ` Ben Warren
2008-04-10  3:31             ` Mike Frysinger
2008-04-08 21:45     ` Mike Frysinger
2008-04-20  6:36   ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox