Skip to content

Instantly share code, notes, and snippets.

@skorotkiewicz
Created July 23, 2026 01:10
Show Gist options
  • Select an option

  • Save skorotkiewicz/88f5e698cd7c8c2de778719b0db64840 to your computer and use it in GitHub Desktop.

Select an option

Save skorotkiewicz/88f5e698cd7c8c2de778719b0db64840 to your computer and use it in GitHub Desktop.
checksums
#!/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"
#!/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