mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
use sha256 command instead of sha256sum on FreeBSD
This commit is contained in:
@@ -32,16 +32,15 @@ check_exists() {
|
|||||||
sha256_check() {
|
sha256_check() {
|
||||||
# Args: <sha256_hash> <filename>
|
# Args: <sha256_hash> <filename>
|
||||||
#
|
#
|
||||||
if check_exists sha256sum; then
|
if [ "$(uname)" = "FreeBSD" ]; then
|
||||||
echo "${1} ${2}" | sha256sum -c
|
# 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
|
elif check_exists sha256; then
|
||||||
if [ "$(uname)" = "FreeBSD" ]; then
|
echo "${1} ${2}" | sha256 -c
|
||||||
sha256 -c "${1}" "${2}"
|
|
||||||
else
|
|
||||||
echo "${1} ${2}" | sha256 -c
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "${1} ${2}" | shasum -a 256 -c
|
echo "${1} ${2}" | shasum -a 256 -c
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user