Created
July 23, 2026 01:10
-
-
Save skorotkiewicz/88f5e698cd7c8c2de778719b0db64840 to your computer and use it in GitHub Desktop.
checksums
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
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| src=${1:?Usage: $0 SOURCE_DIR} | |
| ( | |
| cd "$src" | |
| find . -type f ! -path './checksums.sha256' -print0 | | |
| sort -z | | |
| xargs -0 -r sha256sum | |
| ) > checksums.sha256 | |
| echo "Saved: checksums.sha256" |
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
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| dst=${1:?Usage: $0 DESTINATION_DIR} | |
| cd "$dst" | |
| sha256sum --check checksums.sha256 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment