Skip to content

Commit 7bb8eb0

Browse files
committed
script install_db4.sh added check for patch command
1 parent 4018e23 commit 7bb8eb0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

contrib/install_db4.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
# Copyright (c) 2017-2019 The Bitcoin Core developers
2+
# Copyright (c) 2017-2021 The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

@@ -62,6 +62,12 @@ http_get() {
6262
sha256_check "${3}" "${2}"
6363
}
6464

65+
# Ensure the commands we use exist on the system
66+
if ! check_exists patch; then
67+
echo "Command-line tool 'patch' not found. Install patch and try again."
68+
exit 1
69+
fi
70+
6571
mkdir -p "${BDB_PREFIX}"
6672
http_get "${BDB_URL}" "${BDB_VERSION}.tar.gz" "${BDB_HASH}"
6773
tar -xzvf ${BDB_VERSION}.tar.gz -C "$BDB_PREFIX"

0 commit comments

Comments
 (0)