On 5/1/24 7:26 AM, Jeffrey Walton wrote:
> The shebang is wrong. I merely pointed out the portable way to write one.

I think the issue that you brought up '/usr/bin' vs. '/usr/local/bin',
as the BSDs use, is solved by Autoconf and Automake's installation
process.

They require the normal './configure && make && make install' and in
that process they replace:

     #!@PERL@

with

     #!/usr/bin/perl

or wherever it locates the system installation. We can't do that with
gnulib scripts which don't get installed.

Therefore, it is assumed /bin/sh exists and is a normal-ish POSIX
shell. In the case of prefix-gnulib-mk, a perl script, perl is then
executed from the users $PATH.

    #!/bin/sh

    eval 'exec perl -wSx "$0" "$@"'
         if 0;

I think that should do the same as what you mentioned using
'#!/usr/bin/env perl'.

Collin

Reply via email to