diff --git a/bin/fetch-proxy b/bin/fetch-proxy index 3156de64e..34ee92a95 100755 --- a/bin/fetch-proxy +++ b/bin/fetch-proxy @@ -28,7 +28,11 @@ curl -sLO "$assetbase/$shafile" tar -zxvf "$pkgfile" >&2 expected=$(awk '{print $1}' "$shafile") -computed=$(sha256sum "$pkgfile" | awk '{print $1}') +if [ $(uname) == "Darwin" ]; then + computed=$(openssl dgst -sha256 "$pkgfile" | awk '{print $2}') +else + computed=$(sha256sum "$pkgfile" | awk '{print $1}') +fi if [ "$computed" != "$expected" ]; then echo 'sha mismatch' >&2 exit 1