On 01/31/2011 03:44 AM, Enrico Scholz wrote:
Tom Rini<[email protected]>  writes:

-       for PERLSCRIPT in `grep -rIl ${bindir}/perl ${D}${bindir}`; do
-               sed -i -e 's|^#!${bindir}/perl|#!/usr/bin/env perl|' $PERLSCRIPT
+       for PERLSCRIPT in `grep -rIEl '#!.*/perl' ${D}${bindir}`; do
+               sed -i -e '1s|^#!.*|#!/usr/bin/env perl|' $PERLSCRIPT

This will break shebang lines with interpreter options (e.g.
'#! /usr/bin/perl -T'):

| $ echo '#! /usr/bin/env perl -T'>  /tmp/x.pl
| $ chmod +x /tmp/x.pl
| $ /tmp/x.pl
| /usr/bin/env: perl -T: No such file or directory

Which is why we change it to just /usr/bin/env perl. Given how we use these programs, it's not a problem to drop -w/W/t/T IMHO.

--
Tom Rini
Mentor Graphics Corporation

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Reply via email to