[BRAINSTORM] shebang fixing framework
Chris Rees
utisoft at gmail.com
Tue Apr 30 17:52:12 UTC 2013
On 30 Apr 2013 18:46, "Eitan Adler" <lists at eitanadler.com> wrote:
>
> On 30 April 2013 13:41, Baptiste Daroussin <bapt at freebsd.org> wrote:
> > On Tue, Apr 30, 2013 at 01:38:03PM -0400, Eitan Adler wrote:
> >> On 30 April 2013 13:35, Baptiste Daroussin <bapt at freebsd.org> wrote:
> >> > All of this will be damn slow operations, we want to keep this as
fast as
> >> > possible, even if per-ports it seems quite fast, when you are about
the build
> >> > the whole ports tree few seconds there and there will become hours
> >>
> >> Yes, that is why I ended with "I guess it isn't too bad.", although I
> >> guess it wasn't clear I meant needing lang_FILES.
> >>
> >> I'd prefer shebangfix_FILES and have all the language fixes apply
> >> without needing to specify which one.
> >
> > most of the case you will know what file needs what shebang, so why
trying all
> > possible case when you can get it directly?
>
> If applied as a regex it doesn't really matter.
>
> I'm thinking it will look something like
>
> sed -e regex_for_perl \
> -e regex_for_python \
> -e regex_for_php \
> ${shebangfix_FILES}
>
> or some variant thereof
>
> now that I think about it a bit more it may even be faster than
> forking once per language.
How many ports are likely to have more than one language?
This proposes running each regex over each file in turn.
Chris
More information about the freebsd-ports
mailing list