Re: Unparsable gcc version string? [WAS: lily 1.4.15]
Josip Rodin <email@example.com> writes:
>> Yes, that's what I mean. We just need:
>> gcc --version
> Well, if gcc upstream switched to printing both "gcc " and the version
> afterwards, you can just use $2.
That would not work with (see my 1st email):
$ bison --version
bison (GNU Bison) 1.35
$ flex --version
flex version 2.5.4
Great fun, if everyone would think they've grown so big and important,
it would warrant a diversion from a resonable standardised version
Currently, we just use $NF, which has worked for all tools up till now,
but I can imagine inserting something like:
| sed 's/[^0-9]*$//'
However, with the current:
gcc (GCC) 3.1.1 20020606 (Debian prerelease)
this would yield '20020606'. I don't like the idea having to go the
expr "$ver" : '.*[^-.0-9]\([0-9][0-9]*\.[^ ]*\)'
Jan Nieuwenhuizen <firstname.lastname@example.org> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org
To UNSUBSCRIBE, email to email@example.com
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org