[FFmpeg-devel] [Patch] Make doc/texi2pod.pl more portable

Diego Biurrun diego
Tue Oct 23 08:07:07 CEST 2007


On Mon, Oct 22, 2007 at 07:45:14PM -0700, Dave Yeo wrote:
> On 10/22/07 07:30 pm, Rich Felker wrote:
>> On Mon, Oct 22, 2007 at 07:14:49PM -0700, Dave Yeo wrote:
>>> --- doc/texi2pod.pl	(revision 10843)
>>> +++ doc/texi2pod.pl	(working copy)
>>> @@ -1,4 +1,6 @@
>>> -#! /usr/bin/perl -w
>>> +#!perl
>> I don't think this is valid. Although it would be possible to
>> implement a kernel that searches the path for the interpreter to run,
>> I doubt it's standard behavior and it's probably frowned upon for
>> security reasons.
>> It works on windows only because the kernel has no idea how to execute
>> the script and the shell instead does the work behind the scenes..
>
> Yes I'm not sure either. The example in one book suggests #!/bin/sh at the 
> top which didn't work here and my perl install installed scripts with lines
>  like in the patch but with the full Path.
> texi2html which I downloaded from http://arrozcru.no-ip.org/ffmpeg_sources/ 
> has this which also works
> eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S 
> $0 $argv:q'
> Actually the attached patch also works here.
>
> --- doc/texi2pod.pl	(revision 10843)
> +++ doc/texi2pod.pl	(working copy)
> @@ -1,4 +1,5 @@
> -#! /usr/bin/perl -w
> +eval 'exec perl -wS $0 ${1+"$@"}'
> +    if 0;

I don't know if any of the proposed solutions is valid, but they all
look suspicious to me.

Diego




More information about the ffmpeg-devel mailing list