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: nodejs#48229
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
lpinca authored and MoLow committed Jul 6, 2023
1 parent 1a5cddf commit d9afffa
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 d9afffa

Please sign in to comment.