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

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Jun 11 01:59:46 PDT 2019


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20190611/6210d6d4/attachment.sig>


More information about the notmuch mailing list