Re: kernel config format migration script
Cyrille Lefevre wrote: > > well, at 4.x, FreeBSD sed doesn't support -E, is that GNU sed which support > this option or 5.x FreeBSD sed ? for instance, GNU sed port doesn't exists ! Really? Funny. I'm not sure our sed is GNU sed. IIRC, it uses regex(3) instead of gnuregex. -- Daniel C. Sobral(8-DCS) [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] Windows works, for sufficently small values of "works". To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: kernel config format migration script
Brian Fundakowski Feldman <[EMAIL PROTECTED]> writes: > I made a sed script to ease migration of kernel configuration files from > the few-weeks-ago-CURRENT to current-CURRENT, and thought I might as well > share it since it makes things easy (autonomous :) > > You can find it at > http://people.freebsd.org/~green/oldconfig2new > It requires extended regular expression support (because old regexps > are so cumbersome to actually _use_), so for example: > mv GREEN GREEN.old > perl gethints.pl GREEN > sed -Ef oldconfig2new GREEN.old > GREEN this one seems to be working w/ a standard sed : ==--== CUT HERE ==--== #!/usr/bin/sed -f # since ata[0-9] requires ata alone, delete them. /^#*[ \t]*device[ \t]\{1,\}ata[0-9]\{1,\}/d # delete fd[0-9] and fd alone. /^#*[ \t]*device[ \t]\{1,\}fd[0-9]\{1,\}/d /^#*[ \t]*device[ \t]\{1,\}fd$/d # get rid of terminal spaces s/[ \t]\{1,\}$// # hints stuffs /^ident[ \t]\{1,\}/ { h s/^ident\([ \t]\{1,\}\)\([a-zA-Z0-9_]\{1,\}\)/hints\1"\2.hints"/ # ^^ I'm not sure about this # are underscore and digits valid characters here ? H x } s/^\(#*[ \t]*\)pseudo-device\([ \t]\{1,\}\)/\1device\2/ s/^\(#*[ \t]*\)device\([ \t]\{1,\}\)\([a-zA-Z_]\{1,\}\)\([0-9]\{1,\}\)\([ \t]*\)\([^#]*\)\(.*\)$/\1device\2\3\5\7/ # ^^^ also, here ? ==--== CUT HERE ==--== \t need to be replaced w/ real tabs (under vi, :%s/\\t//g) just in case, I put them here to be reliable (and visible :) via email. Cyrille. -- home:mailto:[EMAIL PROTECTED] Supprimer "no-spam." pour me repondre. work:mailto:[EMAIL PROTECTED] Remove "no-spam." to answer me back. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: kernel config format migration script
> "Cyrille" == Cyrille Lefevre <[EMAIL PROTECTED]> writes: Cyrille> well, at 4.x, FreeBSD sed doesn't support -E, is that GNU sed Cyrille> which support this option or 5.x FreeBSD sed ? for instance, Cyrille> GNU sed port doesn't exists ! FreeBSD-Current sed supports -E option... -- - Éric Jacoboni « No sport, cigars! » (W. Churchill) - To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: kernel config format migration script
Brian Fundakowski Feldman <[EMAIL PROTECTED]> writes: > I made a sed script to ease migration of kernel configuration files from > the few-weeks-ago-CURRENT to current-CURRENT, and thought I might as well > share it since it makes things easy (autonomous :) > > You can find it at > http://people.freebsd.org/~green/oldconfig2new > It requires extended regular expression support (because old regexps > are so cumbersome to actually _use_), so for example: > mv GREEN GREEN.old > perl gethints.pl GREEN > sed -Ef oldconfig2new GREEN.old > GREEN well, at 4.x, FreeBSD sed doesn't support -E, is that GNU sed which support this option or 5.x FreeBSD sed ? for instance, GNU sed port doesn't exists ! Cyrille. -- home:mailto:[EMAIL PROTECTED] Supprimer "no-spam." pour me repondre. work:mailto:[EMAIL PROTECTED] Remove "no-spam." to answer me back. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message