lkml.org 
[lkml]   [2023]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] scripts: dev-needs.sh: Enforce bash usage
On Mon, Nov 14, 2022 at 2:30 AM David Laight <David.Laight@aculab.com> wrote:
>
> From: Steffen Kothe
> > Sent: 12 November 2022 09:41
> ...
> > What about a re-write of the script in POSIX compliant style? This
> > should work then in every shell derivate without weird checks.
> >
> > This would remove for example function declarations, arrays and so on,
> > targeting to the same printable output but with different logic in the
> > background.
>
> A quick read:
>
> - remove the word 'function'.
> - remove all 'local', ensure names are unique.
> - use 'printf '%s' "....." instead of echo -n.
>
> That should be pretty near portable.
> Some shells that don't object to the 'local' keyword don't
> actually implement local variables!
>

Steffen/David,

I'll happily test and take any updates that's at least as readable as
what's there now, as long as it continues working with toybox.

-Saravana

\
 
 \ /
  Last update: 2023-03-26 23:54    [W:0.050 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site