diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2009-06-04 15:05:00 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2009-06-04 15:05:00 +0000 |
commit | 7d1528e6013fef6520d8844e3c0ac466f164ace7 (patch) | |
tree | 0c9fb5c368740d2f0196c44e9437e5b651b871fa | |
parent | 2409c28f216b3e8afb4eeceb2ee314098e79691e (diff) | |
download | rockbox-7d1528e6013fef6520d8844e3c0ac466f164ace7.tar.gz rockbox-7d1528e6013fef6520d8844e3c0ac466f164ace7.zip |
version.sh : fix revision in git-svn trees
"git log .. -1" only shows one commit (the last one), so extract the last line (git-svn-id:..) with tail -n 1, instead of the first line (which is the committer's message in case of multi lines body)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21188 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-x | tools/version.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/version.sh b/tools/version.sh index 7d67fabc8b..25e781c784 100755 --- a/tools/version.sh +++ b/tools/version.sh | |||
@@ -40,7 +40,7 @@ gitversion() { | |||
40 | if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then | 40 | if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then |
41 | 41 | ||
42 | # Get the svn revision of the most recent git-svn commit | 42 | # Get the svn revision of the most recent git-svn commit |
43 | version=`git log --pretty=format:'%b' --grep='git-svn-id: svn' -1 | head -n 1 | perl -ne 'm/@(\d*)/; print "r" . $1;'` | 43 | version=`git log --pretty=format:'%b' --grep='git-svn-id: svn' -1 | tail -n 1 | perl -ne 'm/@(\d*)/; print "r" . $1;'` |
44 | mod="" | 44 | mod="" |
45 | # Is this a git-svn commit? | 45 | # Is this a git-svn commit? |
46 | if ! git log HEAD^.. --pretty=format:"%b" | grep -q "git-svn-id: svn" ; then | 46 | if ! git log HEAD^.. --pretty=format:"%b" | grep -q "git-svn-id: svn" ; then |