Page MenuHomeFreeBSD

nanobsd: Normalize style in common functions
Needs ReviewPublic

Authored by senguptaangshuman17_gmail.com on Tue, Aug 18, 10:37 PM.

Details

Summary

Prefer $(...) over backticks, drop the space before ";" in
conditionals, and normalize sentence-ending punctuation and line
wrapping in comments.

Use printf %s for metalog entries built from path variables so
backslash sequences in paths are printed verbatim.

Collapse the remaining split for loops onto one line to match the
style already used elsewhere in defaults.sh.

Replace sort | uniq with sort -u in setup_nanobsd() and cust_pkgng().

No functional change.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75688
Build 72571: arc lint + arc unit

Event Timeline

tools/tools/nanobsd/defaults.sh
56

I'm no tat all sure that I like this style. Some sentences have a full stop (period) at the end while others do not. It seems needlessly churny for no good benefit.

187

Preferring $() is a great change.

273

But two spaces after a period is something I can get behind.

289

This always should have been printf.

322

I like moving the 'do' up too.

736

shouldn't we indent the cpio more than the find?