mirror of https://github.com/proski/madwifi
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
This commit is contained in:
parent
b56cc910bc
commit
1c37948b92
2
Makefile
2
Makefile
|
@ -72,7 +72,7 @@ $(TOP)/svnversion.h:
|
||||||
ver=$$(svnversion -nc . | sed -e 's/^[^:]*://;s/[A-Za-z]//'); \
|
ver=$$(svnversion -nc . | sed -e 's/^[^:]*://;s/[A-Za-z]//'); \
|
||||||
echo "#define SVNVERSION \"svn r$$ver\"" > $@.tmp; \
|
echo "#define SVNVERSION \"svn r$$ver\"" > $@.tmp; \
|
||||||
elif [ -d .git ]; then \
|
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; \
|
echo "#define SVNVERSION \"svn $$ver\"" > $@.tmp; \
|
||||||
elif [ -s SNAPSHOT ]; then \
|
elif [ -s SNAPSHOT ]; then \
|
||||||
ver=$$(sed -e '/^Revision: */!d;s///;q' SNAPSHOT); \
|
ver=$$(sed -e '/^Revision: */!d;s///;q' SNAPSHOT); \
|
||||||
|
|
Loading…
Reference in New Issue