Re: [PATCH v4/wip 01/12] generate-cmds.sh: factor out synopsis extract code
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Apr 25, 2018, 18:13 UTC
- Message-ID
- <CAM0VKjkbqmWRhuBQEg6+7AKE4YWX3gONCsyf2wnJuLSho2D+ow@mail.gmail.com>
- In-Reply-To
- <CAPig+cTQrbHq9bgge5Ftj+Fi8kMkuL2VtQzs7McuqU-ueVK4vw@mail.gmail.com>
On Wed, Apr 25, 2018 at 7:59 PM Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 11 quoted lines
> On Wed, Apr 25, 2018 at 12:30 PM, Nguyễn Thái Ngọc Duy
> <pclouds@gmail.com> wrote:
> > This makes it easier to reuse the same code in another place (very
> > soon).
> >
> > Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> > ---
> > diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh
> > @@ -1,5 +1,17 @@
> > +get_synopsis () {
> > + local cmd="$1"> 'local' is a Bash-ism, isn't it?
Well, strictly speaking it isn't, because many shells support it besides Bash.
I don't remember seeing any complaints about 01d3a526ad (t0000: check whether the shell supports the "local" keyword, 2017-10-26), but we only have that commit for a couple or months / two releases, so it's still too early to start using 'local' in build scripts.