build: make bootstrap script fail properly on failure

If the first command in the bootstrap script fails, exit with non-zero
exit status instead of silently continuing to the next command.
Merge pull request #4673 from anssih/fix/bootstrap

build: make bootstrap script fail properly on failure