From: proski Date: Wed, 6 Jul 2011 16:22:31 +0000 (+0000) Subject: Use git-svn options to limit its output to one line X-Git-Url: http://git.ozo.com/?p=madwifi%2F.git;a=commitdiff_plain;h=1c37948b922850ec4a0b4d27936edf12d0c832ec Use git-svn options to limit its output to one line This is more reliable than using head and tail. It also suppresses this scary message: error: git-svn died of signal 13 git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4148 0192ed92-7a03-0410-a25b-9323aeb14dbd --- diff --git a/Makefile b/Makefile index bf21ea7..deb8ddc 100644 --- a/Makefile +++ b/Makefile @@ -72,7 +72,7 @@ $(TOP)/svnversion.h: ver=$$(svnversion -nc . | sed -e 's/^[^:]*://;s/[A-Za-z]//'); \ echo "#define SVNVERSION \"svn r$$ver\"" > $@.tmp; \ elif [ -d .git ]; then \ - ver=$$(git svn log | head -n2 | tail -n1 | cut -d\ -f1); \ + ver=$$(git svn log --oneline --limit 1 | cut -d\ -f1); \ echo "#define SVNVERSION \"svn $$ver\"" > $@.tmp; \ elif [ -s SNAPSHOT ]; then \ ver=$$(sed -e '/^Revision: */!d;s///;q' SNAPSHOT); \