Skip to content

Ran through ShellCheck.

Chris Stackpole requested to merge stack/RockyRpi:shellcheck into main

Removed Draft status now that I've run through it a few times. Also a few more changes then the original shellcheck.

  1. Cleaned up all the ShellCheck errors.
  2. I ran into issues because my loopback was loop1p3, not loop0p3... and during testing/experimenting it changed to loop2p3. I worked around that by pulling the information out of kpartx itself. It does make the mount on line 47 a bit messier, but easy enough to handle. I might take another crack at cleaning it up later. I thought about pulling the info out of the first run of kpartx, but thought the readability was slightly better then calling kpartx a second time.
  3. There was an awk followed by a double tr. I pulled it all into awk to save two commands and two pipes. Yeah, I know it's not that much of a computational savings but if awk is already being used... 🤷

I got two successful builds and am calling it good enough for now. I'll gladly take feedback if I can help clean it up any more.

Edited by Chris Stackpole

Merge request reports