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)
Sun, Jun 23, 3:44 PM
Unknown Object (File)
Apr 30 2024, 6:42 PM
Unknown Object (File)
Apr 30 2024, 6:42 PM
Unknown Object (File)
Apr 30 2024, 4:14 PM
Unknown Object (File)
Apr 24 2024, 2:23 AM
Unknown Object (File)
Dec 20 2023, 6:05 AM
Unknown Object (File)
Nov 6 2023, 6:15 AM
Unknown Object (File)
Aug 18 2023, 2:06 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)