forked from TokTok/c-toxcore
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Check hashes of Windows dependencies when cross-compiling
It's a disableable option since we allow the user to change versions of dependencies and we obviously have hashes only for the default versions, we are not able to verify hashes of any other version, so it might be handy to be able to disable the check in that case.
- Loading branch information
Showing
6 changed files
with
39 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
check_sha256() { | ||
[ "$ENABLE_HASH_VERIFICATION" = "true" ] && _check_sha256 "$@" | ||
} | ||
|
||
_check_sha256() { | ||
if ! (echo "$1 $2" | sha256sum -c --status -); then | ||
echo "Error: sha256 of $2 doesn't match the known one." | ||
echo "Expected: $1 $2" | ||
echo "Got: $(sha256sum "$2")" | ||
return 1 | ||
fi | ||
echo "sha256 matches the expected one: $1" | ||
return 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters