summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-04-08 14:00:57 -0400
committerWolfgang Denk <wd@denx.de>2008-04-18 10:08:31 -0700
commit92bad20ad74b70adf3839df9a0a47cce000ac3d7 (patch)
tree89850e7726f4f19febb6748353eca263964f7152 /tools
parentd23ff6827decf121461fbc5622612fd7effe207e (diff)
Add support for u-boot in svn and localversion-* files
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/setlocalversion14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/setlocalversion b/tools/setlocalversion
index 9bbdafdb6dc..bbb2ab2f71f 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`"