Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Apr 2013 18:52:11 +0100
From:      Chris Rees <utisoft@gmail.com>
To:        Eitan Adler <lists@eitanadler.com>
Cc:        ports@freebsd.org, Baptiste Daroussin <bapt@freebsd.org>
Subject:   Re: [BRAINSTORM] shebang fixing framework
Message-ID:  <CADLo83-7apgmaD=KQ25K7qYUwQ8Z0fZ38AzbfSc%2Bo5DKPLb7AQ@mail.gmail.com>
In-Reply-To: <CAF6rxg=_UhYoKJxccZO9sy9-O3ZgMXHd71zxPEP4MPNLMiJR4w@mail.gmail.com>
References:  <20130430103821.GJ3577@ithaqua.etoilebsd.net> <CAF6rxgn_hYd=HTBPm_53UgKd1dGt-ChNZQUoi7-CViZJNtFeGw@mail.gmail.com> <20130430173500.GP3577@ithaqua.etoilebsd.net> <CAF6rxgk2SUVhtfEAuxZU2JdfDi6p25m7vOxe494Rupnh6NDzJw@mail.gmail.com> <20130430174130.GQ3577@ithaqua.etoilebsd.net> <CAF6rxg=_UhYoKJxccZO9sy9-O3ZgMXHd71zxPEP4MPNLMiJR4w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 30 Apr 2013 18:46, "Eitan Adler" <lists@eitanadler.com> wrote:
>
> On 30 April 2013 13:41, Baptiste Daroussin <bapt@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@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo83-7apgmaD=KQ25K7qYUwQ8Z0fZ38AzbfSc%2Bo5DKPLb7AQ>