Re: [PATCH 1/3] Makefile: extract script to generate clar declarations
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Oct 15, 2024, 09:08 UTC
- Message-ID
- <Zw4w9o_YQy4quegm@pks.im>
- In-Reply-To
- <Zw2QT/Kx6IoPhJtT@nand.local>
On Mon, Oct 14, 2024 at 05:42:39PM -0400, Taylor Blau wrote:
Show 16 quoted lines
> On Mon, Oct 14, 2024 at 04:06:41PM +0200, Patrick Steinhardt wrote: > > +while test "$#" -ne 0 > > +do > > + suite="$1" > > + shift > > I'm perhaps nit-picking here, but I find: > > for suite in "$@" > do > ... > done > > to be much more readable than 'while test "$#" -ne 0' and 'shift' > above, since the for-loop variant does not need to mangle its arguments > with shift.
It certainly is, yeah. I know that there was a reason to write it in this convoluted way... was it compatibility with non-Bash shells when there were spaces in the paths? I don't know, and I cannot find a case right now where it breaks.
Will adapt accordingly.
Patrick