Add linting for shell scripts and cleanup shell scripts #237
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This helps ensure we have valid shell scripts, and follow better shell scripts practices. This helps validate some of the packaging scripts that we don't hit very often and aren't part of our normal test process.
This stems from 10974a9, where I discovered we had a rather obvious syntax error in one of our setup shell scripts. This specific shell scripts only gets run during initial install, so I realized it's easy for us to miss these until we go to actually package and install things (where we do have tests, but those only get run when building new packages). It seemed like some basic shell script checks and linting would be like a good idea to try and catch these basic issues earlier, and also ensure better practices within shell scripts (since it's easy to do things wrong in shell script land).
So this uses shellcheck to perform linting on all our shell scripts. Updates were then made to all our shell scripts to better standardize them and fix any warnings The shellcheck linting will run as part of our normal test process in the CI environment now.
The primary changes involved in cleaning things up: