[linter] Avoid unreachable code in shell scripts
Summary: Reported by Shellcheck SC2317. Note that some of the reports are false positive and has been explicitely ignored.
Test Plan:
arc lint --everything
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D13842