From: Luciano Rocha <luciano@eurotux.com>
To: Jakub Narebski <jnareb@gmail.com>
Cc: Denis Bueno <dbueno@gmail.com>, Git Mailing List <git@vger.kernel.org>
Subject: Re: git-instaweb portability issue (maybe?)
Date: Fri, 13 Jun 2008 16:39:13 +0100 [thread overview]
Message-ID: <20080613153913.GB21917@bit.office.eurotux.com> (raw)
In-Reply-To: <m363sdqrk0.fsf@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 1561 bytes --]
On Fri, Jun 13, 2008 at 08:32:20AM -0700, Jakub Narebski wrote:
> Luciano Rocha <luciano@eurotux.com> writes:
> > On Fri, Jun 13, 2008 at 10:39:11AM -0400, Denis Bueno wrote:
> >> On Fri, Jun 13, 2008 at 10:21, Luciano Rocha <luciano@eurotux.com> wrote:
> >>>
> >>> Try changing the following line instead:
> >>> "$PERL" -p -e "$script" "$1.tmp" > "$1"
> >>> to
> >>> $PERL -p -e "$script" "$1.tmp" > "$1"
> >>>
> >>> about line 6121 of the git-instaweb script.
> >>
> >> This is line 6033 for me; however, this change makes it work! (I
> >> verified my changing this line; trying it; then changing it back to
> >> the double-quotes version, and verifying it breaks.)
> >>
> >> Why?
> >
> > "$PERL" means the content of the variable is used as the command to
> > execute.
> >
> > $PERL, on the other hand, goes through a round of word splitting, that
> > in your case results in the command "/usr/bin/env", with the arguments
> > "perl", "-p", ...
> >
> > Thus, if it is possible to use /usr/bin/env, the current "$PERL"
> > incantation is incorrect.
>
> The problem is with trying to ensure that both
>
> /path/with spaces/perl
>
> and
>
> /usr/bin/env perl
>
> work, as they require different rules wrt. splitting on whitespace...
Oh. Then it gets ugly. Can't just "perl" be used? Instead of
"/usr/bin/env perl"?
Otherwise...
if [ -x "$PERL" ]; then
"$PERL" ...
else
$PERL ...
fi
--
Luciano Rocha <luciano@eurotux.com>
Eurotux Informática, S.A. <http://www.eurotux.com/>
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2008-06-13 15:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-13 13:26 git-instaweb portability issue (maybe?) Denis Bueno
2008-06-13 13:38 ` Denis Bueno
2008-06-13 13:46 ` Asheesh Laroia
2008-06-13 13:59 ` Denis Bueno
2008-06-13 14:10 ` Chris Ridd
2008-06-13 14:16 ` Asheesh Laroia
2008-06-13 14:42 ` Chris Ridd
2008-06-13 14:47 ` Denis Bueno
2008-06-13 14:21 ` Luciano Rocha
2008-06-13 14:39 ` Denis Bueno
2008-06-13 15:13 ` Luciano Rocha
2008-06-13 15:32 ` Jakub Narebski
2008-06-13 15:39 ` Luciano Rocha [this message]
2008-06-13 14:22 ` Jakub Narebski
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=20080613153913.GB21917@bit.office.eurotux.com \
--to=luciano@eurotux.com \
--cc=dbueno@gmail.com \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).