All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
To: Junio C Hamano <junkio@cox.net>
Cc: Michal Rokos <michal.rokos@nextsoft.cz>, git@vger.kernel.org
Subject: Re: [Patch] Using 'perl' in *.sh
Date: Sun, 9 Jul 2006 23:20:51 +0200	[thread overview]
Message-ID: <20060709212051.GW22573@lug-owl.de> (raw)
In-Reply-To: <7v4pxqfri7.fsf@assigned-by-dhcp.cox.net>

[-- Attachment #1: Type: text/plain, Size: 2096 bytes --]

On Sun, 2006-07-09 13:33:04 -0700, Junio C Hamano <junkio@cox.net> wrote:
> Michal Rokos <michal.rokos@nextsoft.cz> writes:
> > On Sunday 09 July 2006 12:14, Junio C Hamano wrote:
> >> Michal, is there a reason you do not want to have the version of
> >> perl you teach git tools via #! lines with PERL_PATH on your $PATH?
> >
> > I have no problem with that. I can set $PATH.
> > But then I'd suggest to change magic #!
> > from #!/usr/bin/perl
> > to #!/usr/bin/env perl
> > for *.perl
> >
> > It that what you meant?
> 
> No, that is not what I meant.

Though I think you actually should :-)

> Invocation of perl _in_ scripts can be controlled by user's
> PATH, but #! cannot be.  As Merlyn says 'env' is a nice hack,
> but we configure the scripts we install to have #!  pointing at
> the right interpreter as a more cleaner (than using 'env', that
> is) workaround anyway, so #! pointing at PERL_PATH and scripts
> relying on user's $PATH would be the right thing to do.

It's just a question of the target system, so: What is our target? If
we target a fairly recent Unix box, we'd put whatever a user asked for
into the shellbang, and hope that he properly sets $PATH.

If we try to aim at POSIX systems, then first of all, `env' isn't a
hack. It's specified i the POSIX documents, even argument passing is
given. (So if `#!/usr/bin/env perl -w' doesn't work on a HP-UX system,
that's simply broken wrt. POSIX.)

At the maximum, we'd allow the user to supply the location of `env' if
it's not /usr/bin/env, but I guess you'll find a hard time finding a
system where there's no /usr/bin/env...  The final killer would be to
explicitely mention the interpreter and install all scripts a-x to
force that :-)

MfG, JBG

-- 
Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 für einen Freien Staat voll Freier Bürger"  | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-07-09 21:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-08 15:32 [Patch] Using 'perl' in *.sh Michal Rokos
2006-07-08 18:27 ` Junio C Hamano
2006-07-09  9:46   ` Alex Riesen
2006-07-09  9:51     ` Jan-Benedict Glaw
2006-07-09 10:14       ` Junio C Hamano
2006-07-09 12:41         ` Michal Rokos
2006-07-09 14:02           ` Randal L. Schwartz
2006-07-09 16:24             ` Jan-Benedict Glaw
2006-07-09 20:33           ` Junio C Hamano
2006-07-09 21:20             ` Jan-Benedict Glaw [this message]
2006-07-10  5:41             ` Michal Rokos
2006-07-10 13:09               ` Randal L. Schwartz
2006-07-10 13:16                 ` Johannes Schindelin
2006-07-10 13:29                   ` Randal L. Schwartz
2006-07-09 10:09     ` Yakov Lerner
2006-07-09 12:17       ` Alex Riesen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060709212051.GW22573@lug-owl.de \
    --to=jbglaw@lug-owl.de \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=michal.rokos@nextsoft.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.