Re: [PATCH] Fix git-instaweb breakage on MacOS X due to the limited sed functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



El 19/12/2007, a las 12:36, Charles Bailey escribió:

On Wed, Dec 19, 2007 at 12:28:04PM +0100, Wincent Colaiuta wrote:

I think it's a bad idea to hard-code the perl path there; the
generated scripts only assume /usr/bin/perl if the user hasn't
overridden it at build time:

	PERL_PATH=/foo/perl make ...

Using just this should work fine anyway:

	perl -p -e ...


I agree completely, but all the generated scripts output hard coded
paths so it would seem inconsistent not to qualify the path in this
case too.

It's not hard-coded, it's dynamic. Witness:

$ make PERL_PATH=/Volumes/Clon/usr/bin/perl
$ head -1 git-add--interactive
#!/Volumes/Clon/usr/bin/perl -w

 Would  @@PERL_PATH@@perl -p -e work, do you know?

I don't think so, but judging from the following section of the Makefile, I think @@PERL@@ would. Why don't you give it a try?

$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
        $(QUIET_GEN)$(RM) $@ $@+ && \
        sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
            -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
            -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
            -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
            -e 's|@@HTMLDIR@@|$(htmldir_SQ)|g' \
            $@.sh >$@+ && \
        chmod +x $@+ && \
        mv $@+ $@

Cheers,
Wincent


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux