shellcheck fails on .gitlab/ci/build-host.sh & .gitlab/ci/build-inside-vm.sh
The shellcheck job started to fail on 2020-04-21 when shellcheck 0.7.2-1 landed in the repos. shellcheck v0.7.2 added more checks which means our scripts need fixing.
Job #20399 failed for 1a971096:
In .gitlab/ci/build-host.sh line 12: readonly TMPDIR="$(mktemp --dry-run --directory --tmpdir="${PWD}/tmp")" ^----^ SC2155: Declare and assign separately to avoid masking return values. In .gitlab/ci/build-inside-vm.sh line 9: readonly tmpdir="$(mktemp --dry-run --directory --tmpdir="${orig_pwd}/tmp")" ^----^ SC2155: Declare and assign separately to avoid masking return values. In .gitlab/ci/build-inside-vm.sh line 25: chown "${SUDO_UID}:${SUDO_GID}" "${1}"{,.b2,.sha{256,512}} ^---------^ SC2153: Possible misspelling: SUDO_GID may not be assigned, but SUDO_UID is. For more information: https://www.shellcheck.net/wiki/SC2153 -- Possible misspelling: SUDO_GID ma... https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ...