[OpenBIOS] [PATCH v3] Add revision number to banner
BALATON Zoltan
balaton at eik.bme.hu
Thu Dec 3 01:06:06 CET 2015
On Wed, 2 Dec 2015, Programmingkid wrote:
> +ifeq ($(REVISION),) # Try using git to find the revision number
> + REVISION := $(shell git svn log --oneline -1 | cut -d '|' -f1 | cut -d 'r' -f2 | cut -d ' ' -f 1)
Better but you could cut with separator ' ' right away instead of '|' in
the first invocation and then you don't need the third cut. But I think
using sed instead of cut could be the simplest here. For example like
this:
git svn log --oneline -1 | sed -e 's/^r\([0-9]*\).*/\1/'
Regards,
BALATON Zoltan
More information about the OpenBIOS
mailing list