Skip to content

Commit

Permalink
Merge pull request #18 from Automattic/fix/shasum
Browse files Browse the repository at this point in the history
Use platform-agnostic hashing functions
  • Loading branch information
jkmassel authored Feb 19, 2022
2 parents 643f807 + ce98a74 commit 082a1fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/hash_directory
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ fi
# - Run `sha256sum` on each file found – the `+` flag does it in parallel for a huge speed boost.
# - Sort the files by filename for deterministic hashing
# - Take the hash of all of the output hashes (and file paths)
find "$DIRECTORY_PATH" -type f -exec shasum -a 256 "{}" \+ | sort -k 2 | shasum -a 256 | cut -f1 -d " "
find "$DIRECTORY_PATH" -type f -exec sha256sum "{}" \+ | sort -k 2 | shasum -a 256 | cut -f1 -d " "
2 changes: 1 addition & 1 deletion bin/hash_file
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ if [ -z "$1" ]; then
exit 1
fi

shasum -a 256 "$1" | cut -f1 -d " "
sha256sum "$1" | cut -f1 -d " "

0 comments on commit 082a1fb

Please sign in to comment.