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

BALATON Zoltan balaton at eik.bme.hu
Wed Dec 2 12:48:56 CET 2015

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.


More information about the OpenBIOS mailing list