mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
use sha256 command instead of sha256sum on FreeBSD
This commit is contained in:
parent
65de8eeeca
commit
22e9afe40d
1 changed files with 7 additions and 8 deletions
|
@ -32,16 +32,15 @@ check_exists() {
|
|||
sha256_check() {
|
||||
# Args: <sha256_hash> <filename>
|
||||
#
|
||||
if check_exists sha256sum; then
|
||||
echo "${1} ${2}" | sha256sum -c
|
||||
if [ "$(uname)" = "FreeBSD" ]; then
|
||||
# sha256sum exists on FreeBSD, but takes different arguments than the GNU version
|
||||
sha256 -c "${1}" "${2}"
|
||||
elif check_exists sha256sum; then
|
||||
echo "${1} ${2}" | sha256sum -c
|
||||
elif check_exists sha256; then
|
||||
if [ "$(uname)" = "FreeBSD" ]; then
|
||||
sha256 -c "${1}" "${2}"
|
||||
else
|
||||
echo "${1} ${2}" | sha256 -c
|
||||
fi
|
||||
echo "${1} ${2}" | sha256 -c
|
||||
else
|
||||
echo "${1} ${2}" | shasum -a 256 -c
|
||||
echo "${1} ${2}" | shasum -a 256 -c
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue