mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
tools: use shasum instead of sha256sum
By default, there is no sha256sum command in macOS. PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user