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

Programmingkid programmingkidx at gmail.com
Thu Dec 3 01:39:50 CET 2015


On Dec 2, 2015, at 7:34 PM, BALATON Zoltan wrote:

> On Wed, 2 Dec 2015, Programmingkid wrote:
>> On Dec 2, 2015, at 7:06 PM, BALATON Zoltan wrote:
>>> git svn log --oneline -1 | sed -e 's/^r\([0-9]*\).*/\1/'
>> 
>> Looks like an indecipherable mess.
>> 
>> Goes and tries it out.... OK it does work. If you don't
>> mind, I would prefer to stick with cut. Cut is a lot
>> easier to understand. Regular expressions look like
>> someone just pushed a bunch of random keys on their
>> keyboard.
> 
> OK, I have no strong opinion on this but I don't think cut is very portable, sed is much more common. But here's anoter version similar to your cut way just using the shell only if you like:
> 
> REVISION="$(git svn log --oneline -1)" && REVISION="${REVISION%% *}" && REVISION="${REVISION#r}" && echo $REVISION


This looks like bash only scripting. I seem to remember Mark not liking the idea of having to use a certain shell. Thank you for this information.


More information about the OpenBIOS mailing list