Bug#922423: initscripts: formatting of scripts

2025-03-19 Thread Marc Chantreux
hello, On Mon, Mar 17, 2025 at 09:31:22PM +0100, Thorsten Glaser wrote: > > Scripts should follow the style produced by shfmt(1) > FWIW, never heard of that tool. shell is one of my main programming langages since the last millenium and I confirm: shfmt is unkown by the communities I belong to.

Bug#922423: initscripts: formatting of scripts

2025-03-18 Thread Mark Hindley
On Tue, Mar 18, 2025 at 09:32:25AM +0100, Martin Steigerwald wrote: > However I think for any new scripts and in case someone likes to > contribute adapted scripts a mention of init-d-script in README.style > would be good. Yes, I agree. I have added - consider using init-d-script(5) Thanks

Bug#922423: initscripts: formatting of scripts

2025-03-18 Thread Martin Steigerwald
Mark Hindley - 18.03.25, 08:41 CET/CEST: > On Mon, Mar 17, 2025 at 07:12:27PM +0100, Lorenzo wrote: > > partially off topic but I think it will help if we recommend to use > > the /lib/init/init-d-script since by using it you decrease the amount > > of code that can display inconsistent style. > >

Bug#922423: initscripts: formatting of scripts

2025-03-18 Thread Mark Hindley
On Mon, Mar 17, 2025 at 07:12:27PM +0100, Lorenzo wrote: > partially off topic but I think it will help if we recommend to use > the /lib/init/init-d-script since by using it you decrease the amount > of code that can display inconsistent style. Yes. the example LSB script has been init-d-script b

Bug#922423: initscripts: formatting of scripts

2025-03-17 Thread Martin Steigerwald
Hi. Lorenzo - 17.03.25, 19:12 CET/CEST: > > I agree we should do this for forky cycle. Can we agree the style we > > want? > > > > As a starter, I suggest (debian/src/README.style) > > partially off topic but I think it will help if we recommend to use > the /lib/init/init-d-script since by usin

Bug#922423: initscripts: formatting of scripts

2025-03-17 Thread Thorsten Glaser
On Mon, 17 Mar 2025, Mark Hindley wrote: > Scripts should follow the style produced by shfmt(1) FWIW, never heard of that tool. > - case indented Don’t indent case, it’s useless and just adds clutter. You cannot have something other than the pattern inside, so: case $foo in (bar) echo

Bug#922423: initscripts: formatting of scripts

2025-03-17 Thread Mark Hindley
I am going to suggest a few more. - avoid obsolete x prefixes such as [ x"$VARIABLE" = xvalue ] - avoid [ .. -a .. ] and [ .. -o .. ] in POSIX scripts (undefined) Mark

Bug#922423: initscripts: formatting of scripts

2025-03-17 Thread Mark Hindley
On Fri, Feb 15, 2019 at 05:27:26PM +, Dmitry Bogatov wrote: > Package: initscripts > Severity: wishlist > > initscripts currently quite inconsistent in programming style and > formatting, using mix of tabs and spaces, test and [ ] and so on. I agree we should do this for forky cycle. Can we a

Bug#922423: initscripts: formatting of scripts

2019-02-15 Thread Dmitry Bogatov
Package: initscripts Severity: wishlist initscripts currently quite inconsistent in programming style and formatting, using mix of tabs and spaces, test and [ ] and so on. It would be nice to have it uniformed. I believe, it would help to have some common patterns abstracted. pgpcKo9ddJZOg.pgp