Skip to content

Commit

Permalink
tools: use shasum instead of sha256sum
Browse files Browse the repository at this point in the history
By default, there is no sha256sum command in macOS.

PR-URL: #48229
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Mestery <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
lpinca authored May 29, 2023
1 parent 2fac041 commit 4aa17bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/dep_updaters/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ log_and_verify_sha256sum() {
package_name="$1"
archive="$2"
checksum="$3"
bsd_formatted_checksum=$(sha256sum --tag "$archive")
bsd_formatted_checksum=$(shasum -a 256 --tag "$archive")
if [ -z "$3" ]; then
echo "$bsd_formatted_checksum"
else
archive_checksum=$(sha256sum "$archive")
archive_checksum=$(shasum -a 256 "$archive")
if [ "$checksum" = "$archive_checksum" ]; then
echo "Valid $package_name checksum"
echo "$bsd_formatted_checksum"
Expand Down

0 comments on commit 4aa17bc

Please sign in to comment.