Page MenuHomeFreeBSD

beinstall.sh: Various shell scripting improvements
Needs ReviewPublic

Authored by bcr on Jun 29 2023, 12:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 21 2024, 12:10 PM
Unknown Object (File)
Oct 7 2024, 10:54 AM
Unknown Object (File)
Oct 6 2024, 10:32 PM
Unknown Object (File)
Oct 4 2024, 7:04 PM
Unknown Object (File)
Oct 4 2024, 8:03 AM
Unknown Object (File)
Oct 3 2024, 11:40 PM
Unknown Object (File)
Oct 3 2024, 7:57 PM
Unknown Object (File)
Oct 3 2024, 4:16 PM

Details

Reviewers
None
Group Reviewers
Src Committers
Summary

This patch does the following:

  1. Remove whitespace at the end of one line of license text
  2. $var -> ${var}
  3. use double quotes around variables to prevent globbing and word splits
  4. Use ${@} instead of ${*} when looping over elements to prevent whitespace problems
  5. Instead of [ expr1 -o expr2 ] use [expr1] || [expr2] as the former may have side effects
  6. Save a pipe by using awk's / / functionality to search for a string instead of using grep piped to awk
Test Plan

Check output of beinstall.sh

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

bcr requested review of this revision.Jun 29 2023, 12:40 PM
bcr edited the summary of this revision. (Show Details)
bcr edited the summary of this revision. (Show Details)