Improve multi-line kernel ident parsing

Instead of blindly grabbing the line with 'Version string' and the
following one from the core info file, take all lines after 'Version
string' until the one one that matches the field format in the core info
file.  This provides compatibility with VendorBSD modifications that have
a different kernel ident format.

Reviewed by:	jhb
This commit is contained in:
Ed Maste 2012-03-07 18:46:21 +00:00
parent d9514f6739
commit 7ad50a360b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=232666
1 changed files with 4 additions and 3 deletions

View File

@ -45,10 +45,11 @@ find_kernel()
nextline=1
next
}
// {
if (nextline) {
print
nextline==1 {
if ($0 ~ "^ [A-Za-z ]+: ") {
nextline=0
} else {
print
}
}' $INFO)