diff options
author | Nathan Garabedian <ngara23@gmail.com> | 2021-11-23 07:24:35 -0800 |
---|---|---|
committer | Nathan Garabedian <ngara23@gmail.com> | 2021-11-23 07:24:35 -0800 |
commit | 7bb8eb0bc352b47ee962283898f9becbb4f36c62 (patch) | |
tree | f366778bfc5e59d3213d79b035a508709851f997 /contrib | |
parent | 4018e23aa7e7bb57d721c7c41c55dfbb659b8c34 (diff) |
script install_db4.sh added check for patch command
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/install_db4.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/install_db4.sh b/contrib/install_db4.sh index 36a4ea08f6..81c88a2ae7 100755 --- a/contrib/install_db4.sh +++ b/contrib/install_db4.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2017-2019 The Bitcoin Core developers +# Copyright (c) 2017-2021 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -62,6 +62,12 @@ http_get() { sha256_check "${3}" "${2}" } +# Ensure the commands we use exist on the system +if ! check_exists patch; then + echo "Command-line tool 'patch' not found. Install patch and try again." + exit 1 +fi + mkdir -p "${BDB_PREFIX}" http_get "${BDB_URL}" "${BDB_VERSION}.tar.gz" "${BDB_HASH}" tar -xzvf ${BDB_VERSION}.tar.gz -C "$BDB_PREFIX" |