contrib: FreeBSD compatibility in install_db4.sh
Unfortunately, FreeBSD uses yet another syntax for `sha256`. Support FreeBSD's syntax too. Using `uname` is a bit of a hack but it works and I found no way to distinguish the two.
This commit is contained in:
parent
c0298b06e5
commit
d95c83d193
1 changed files with 5 additions and 1 deletions
|
@ -31,7 +31,11 @@ sha256_check() {
|
|||
if 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
|
||||
else
|
||||
echo "${1} ${2}" | shasum -a 256 -c
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue