[OpenBIOS] [PATCH v2] Add revision number to banner

Programmingkid programmingkidx at gmail.com
Wed Dec 2 21:22:09 CET 2015


On Dec 2, 2015, at 6:48 AM, BALATON Zoltan wrote:

> On Tue, 1 Dec 2015, Programmingkid wrote:
>> +# Set the REVISION variable to the current svn revision or to "unknown"
>> +REVISION := $(shell svn info .. | grep "Revision: " | cut -c11-16)
>> +ifeq ($(REVISION),)	# Try using git to find the revision number
>> +    REVISION := $(shell git svn log --oneline -1 | cut -d '|' -f1 | cut -c2-5)
> 
> The revision number can be arbitrarily long so cutting from chars 2-5 may not always work. Maybe stripping unwanted leading and trailing chars via shell ${REVISION#r} and ${REVISION%% *} parameter expansion would work better or using sed to get numeric characters only could be more portable.

Your right. I have made a new patch that works the way you suggested. Thank you.


More information about the OpenBIOS mailing list