[r6rs-discuss] [Formal] "#! /usr/bin/env" is not "portable." It's Unix-specific.

From: Trent Buck <trentbuck>
Date: Wed Nov 22 16:40:31 2006

On Wed, Nov 22, 2006 at 11:38:58AM -0500, John Cowan wrote:
> Michael Sperber scripsit:
>
> > While I agree with many things said in this thread, most posts I've
> > read ignore the fact that the specification of
> >
> > #!/usr/bin/env scheme-script
> >
> > talks about a little bit more than just the first line of script: It
> > encourages Scheme implementors on Unix systems to provide an entry
> > point in the form of an executable called "scheme-script". It may be
> > doing so in a fairly brain-damaged manner, but nevertheless.
>
> So much the worse, I fear.
>
> It's not uncommon to have more than one Scheme installed; who gets
> to be "scheme-script"? By default, the last Scheme installed, which
> is a silly policy.

Under Debian, at least, there is a mechanism called "alternatives" to
choose the "best" installed alternative to be symlinked to a common
name.

For example, if you install mawk and gawk, /usr/bin/awk will default
to gawk and be customizable with `update-alternatives --config awk'.

I concede that not all systems have such a mechanism.
-- 
Trent Buck, Student Errant
Received on Wed Nov 22 2006 - 16:39:37 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC