This patch fixes the following issues in the shell script:
- Quote default assignments, see SC2223
- Use $() instead of backticks, see SC2006
- Double quote $@, see SC2068
- Double quote variables in if-statements and other places, see SC2086
While here, fix a whitespace at end of line instance in the license text.