HomePhabricator

Make gen-manpages.sh return non-zero if the script fails at any point

Description

Make gen-manpages.sh return non-zero if the script fails at any point

Summary:
The script can fail if one of the binaries doesn't exist or cannot be run for some reason,
but these failures do not cause the script to return a non-zero exit code.

This patch makes the script return non-zero for these cases as well as cleaning up correctly.

Test Plan:

cd build
ninja
cd ..
BUILDDIR=$PWD/build contrib/devtools/gen-manpages.sh  # succeeds

rm build/src/qt/bitcoin-qt
BUILDDIR=$PWD/build contrib/devtools/gen-manpages.sh  # fails

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5360

Details

Provenance
jasonbcoxAuthored on Feb 28 2020, 01:26
jasonbcoxPushed on Feb 28 2020, 15:58
Reviewer
Restricted Project
Differential Revision
D5360: Make gen-manpages.sh return non-zero if the script fails at any point
Parents
rABCe3c138cdadcd: Increase robustness against UB in secp256k1_scalar_cadd_bit
Branches
Unknown
Tags
Unknown