Re: [PATCH V2] test: aggregate-results.sh: consistent style. zero forks.

Subject: Re: [PATCH V2] test: aggregate-results.sh: consistent style. zero forks.

Date: Tue, 11 Jun 2019 09:59:46 +0100

To: Tomi Ollila, notmuch@notmuchmail.org

Cc:

From: Daniel Kahn Gillmor


On Mon 2019-06-10 21:39:23 +0300, Tomi Ollila wrote:
> - all variables in $((...)) without leading $
> - all comparisons use -gt, -eq or -ne
> - no -a nor -o inside [ ... ] expressions
> - all indentation levels using one tab
>
> Dropped unnecessary empty string check when reading results files.
>
> Replaced pluralize() which was executed in subshell with
> pluralize_s(). pluralize_s sets $s to 's' or '' based on value of
> $1. Calls to pluralize_s are done in context of current shell, so
> no forks to subshells executed.
> ---
>
> V2: added quotes all "$variable" references where empty values or
>     IFS characters could make a difference. Not in this script, but
>     servers better example as a usage style elsewhere (where it could
>     matter).

LGTM.  Thanks, Tomi!

       --dkg
signature.asc (application/pgp-signature)
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: