tools: Fix accidental override on checksum copy

The former seemed to replace the wrong line with the copied checksum.
We now add read it from the first line and add it on top of our sums.
This expression also seems a fair bit easier to understand now.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
This commit is contained in:
Peter Neuroth 2023-08-25 12:15:59 +02:00 committed by Rusty Russell
parent 43aeaff1a8
commit 8f02678147
1 changed files with 1 additions and 2 deletions

View File

@ -334,8 +334,7 @@ if [ "$VERIFY_RELEASE" = "true" ]; then
sha256sum clightning-"$VERSION"* > SHA256SUMS
# Replacing Fedora checksums from root file to release/SHA256SUMS
# because we do not have reproducible builds for Fedora
replace_fedora_sums=$(head -n 1 "../SHA256SUMS-$VERSION")
{ echo "$replace_fedora_sums"; tail -n +2 SHA256SUMS; } > SHA256SUMS.tmp && mv SHA256SUMS.tmp SHA256SUMS
echo "$(head -n1 ${sumfile})\n$(head SHA256SUMS)" > SHA256SUMS
# compare our and release captain's SHA256SUMS contents
if [ -f "SHA256SUMS" ] && cmp -s "SHA256SUMS" "../SHA256SUMS-$VERSION"; then
echo "SHA256SUMS are Identical"