summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2009-06-04 15:05:00 +0000
committerRafaël Carré <rafael.carre@gmail.com>2009-06-04 15:05:00 +0000
commit7d1528e6013fef6520d8844e3c0ac466f164ace7 (patch)
tree0c9fb5c368740d2f0196c44e9437e5b651b871fa /tools
parent2409c28f216b3e8afb4eeceb2ee314098e79691e (diff)
downloadrockbox-7d1528e6013fef6520d8844e3c0ac466f164ace7.tar.gz
rockbox-7d1528e6013fef6520d8844e3c0ac466f164ace7.tar.bz2
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
Diffstat (limited to 'tools')
-rwxr-xr-xtools/version.sh2
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() {
if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
# Get the svn revision of the most recent git-svn commit
- version=`git log --pretty=format:'%b' --grep='git-svn-id: svn' -1 | head -n 1 | perl -ne 'm/@(\d*)/; print "r" . $1;'`
+ version=`git log --pretty=format:'%b' --grep='git-svn-id: svn' -1 | tail -n 1 | perl -ne 'm/@(\d*)/; print "r" . $1;'`
mod=""
# Is this a git-svn commit?
if ! git log HEAD^.. --pretty=format:"%b" | grep -q "git-svn-id: svn" ; then