22 lines
623 B
Bash
Executable File
22 lines
623 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
repo_root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
|
|
|
cd "$repo_root"
|
|
git lfs fsck
|
|
shasum -a 256 -c checksums/published-files.sha256
|
|
shasum -a 256 -c checksums/archive-parts.sha256
|
|
awk '
|
|
NR == FNR { expected[$2] = $1; next }
|
|
!($2 in expected) || expected[$2] != $1 { bad = 1 }
|
|
{ delete expected[$2] }
|
|
END {
|
|
for (name in expected) bad = 1
|
|
exit bad
|
|
}
|
|
' checksums/main-archives.sha256 checksums/reassembled-archives.sha256
|
|
|
|
echo "Repository files and LFS objects verified."
|
|
echo "Run ./scripts/reassemble-archives.sh /path/to/output for whole-archive verification."
|