Standardize the formatting of .sh files using auto-formatting specified
in .editorconfig, plus some manual reformatting that conforms to
.editorconfig:
- Fix improper indents
- Use 4-character-wide tabs for indents
- Append () to function names in function declarations
- Only one empty line at end of file
- Add or remove empty lines
- Insert initial spaces in comments
- Removed unnecessary semicolons
- Spread conditionals over multiple lines
- Other minor spacing & format cleanup