[U-Boot] [PATCH 2/3] mkconfig: create CONFIG_ defines without relying on GNU extensions
Mike Frysinger
vapier at gentoo.org
Tue Jul 19 23:03:16 CEST 2011
On Tue, Jul 19, 2011 at 16:41, Jeroen Hofstee wrote:
> Parsing of boards.cfg relies on sed GNU extensions and fails if sed
> doesn't support these. On FreeBSD this leads to the error:
>
> sed: 1: "/=/ {s/=/\t/;q } ; { s/ ...": extra characters at the end
> of q command
>
> - i="`echo ${i} | sed '/=/ {s/=/\t/;q } ; { s/$/\t1/ }'`"
> + i="`echo ${i} | sed -e '/=/!s/$/=1/' -e 's/=/ /'`"
maybe i havent read enough sed scripts, but i dont think ive seen "!"
used before. how about this more straightforward replacement:
sed -e '/=/{s/=/\t/;q}' -e 's/$/\t1/'
-mike
More information about the U-Boot
mailing list