Created
June 12, 2024 03:41
-
-
Save LightningStalker/3a6f0a5b855aa0a39efac1cead58fd20 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/bin/bash | |
| # script that reads a YAML (.yml) file and verifies a local file against its sha512 hash | |
| # extraction of multiple digest entries not supported | |
| # these .yml are rumored to be spawn of electron-builder or ... | |
| hash=$(sed -n 's/^sha512: //p' $1 | base64 -d | xxd -p -c64) | |
| fname=$(sed -n 's/path: //p' $1) | |
| echo -n $hash' '$fname | sha512sum -c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment