Page MenuHomeFreeBSD

Fix most shellcheck warnings in newvers.sh
Changes PlannedPublic

Authored by arichardson on Dec 15 2018, 10:54 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 1, 2:19 AM
Unknown Object (File)
Nov 5 2023, 3:01 PM
Unknown Object (File)
Nov 1 2023, 8:59 PM
Unknown Object (File)
Nov 1 2023, 3:32 PM
Unknown Object (File)
Oct 24 2023, 9:30 AM
Unknown Object (File)
Oct 12 2023, 12:49 AM
Unknown Object (File)
Oct 4 2023, 1:58 PM
Unknown Object (File)
Sep 30 2023, 9:03 PM
Subscribers
None

Details

Reviewers
emaste
markj
Summary

I did not fix the warning that "local" is undefined in POSIX sh since that
seems to be supported by /bin/sh on both FreeBSD and macOS

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 21586
Build 20889: arc lint + arc unit

Event Timeline

Using $( ) instead of ` is an improvement IMO, I'm a little less convinced by some of the new quote use.

sys/conf/newvers.sh
196

The quotes here seem confusing.

275–292

p4 section has been removed

This file is pretty inconsistent about the use of braces around variable names; I prefer not to use them unless they're needed, like on line 299 in the new version.

sys/conf/newvers.sh
228

Does it not complain about the missing quotes around $svnversion?

This revision is now accepted and ready to land.Feb 27 2019, 2:31 AM

Using $( ) instead of ` is an improvement IMO, I'm a little less convinced by some of the new quote use.

Agreed. I'm not a big fan of quoting every variable expansion, but it doesn't hurt.

sys/conf/newvers.sh
196

"$(realpath ${0})" or completely omit them?

228

No warning. Either it assumes there can't be any spaces or it doesn't print the warning for non-arguments.

275–292

Will rebase shortly.