[PATCH v2 01/13] Fix various shellcheck findings