[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-hackers
Subject: Re: The right way to invoke sh from a freebsd makefile?
From: Glen Barber <gjb () FreeBSD ! org>
Date: 2013-09-23 0:02:48
Message-ID: 20130923000248.GG2336 () glenbarber ! us
[Download RAW message or body]
On Sun, Sep 22, 2013 at 05:56:07PM -0600, Ian Lepore wrote:
> > You can hard-code /bin/sh directly, but what I was getting at with the
> > '#!/usr/bin/env sh' is that the 'sh' interpreter of the build
> > environment could be used (instead of /bin/sh directly). Then you don't
> > need to worry about the path to sh(1).
> >
>
> My point is that the #! isn't used at all in this case, it doesn't
> matter what's there. Try this...
>
> echo "echo foo" >/tmp/foo
> sh /tmp/foo
>
> Not only does it not need the hashbang, the script doesn't even have to
> be executable when you launch sh and name a script on the command line,
> which is just what's needed to run a script from a directory mounted
> with the noexec flag.
>
Ah - maybe it's just late. I see what you mean now. Thanks.
Glen
[Attachment #3 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic