cagebreak/test/hashes-md
project-repo bea18c7a6f Release 2.1.1
- Adjust dependency versions
- Add release tests
- Add a quick installation script
- Add small utility scripts
- Add note on review and developer certificate of origin (DCO)
- Add note on accessibility
2023-04-17 22:17:06 +02:00

53 lines
1.1 KiB
Bash

#!/bin/bash
# Copyright 2023, project-repo and the cagebreak contributors
# SPDX-License-Identifier: MIT
VERSION=$1
RESULT=0
# shellcheck disable=2164
cd "${MESONCURRENTCONFIGDIR}"
cb256=$(sha256sum build/cagebreak | cut -d " " -f1 )
cb256man1=$(sha256sum build/cagebreak.1 | cut -d " " -f1 )
cb256man5=$(sha256sum build/cagebreak-config.5 | cut -d " " -f1 )
cb256man7=$(sha256sum build/cagebreak-socket.7 | cut -d " " -f1 )
cb512=$(sha512sum build/cagebreak | cut -d " " -f1 )
cb512man1=$(sha512sum build/cagebreak.1 | cut -d " " -f1 )
cb512man5=$(sha512sum build/cagebreak-config.5 | cut -d " " -f1 )
cb512man7=$(sha512sum build/cagebreak-socket.7 | cut -d " " -f1 )
hashesdoc=$(head -21 Hashes.md)
testdoc="# Hashes
$VERSION cagebreak
* sha 256: ${cb256}
* sha 512: ${cb512}
$VERSION cagebreak.1
* sha 256: ${cb256man1}
* sha 512: ${cb512man1}
$VERSION cagebreak-config.5
* sha 256: ${cb256man5}
* sha 512: ${cb512man5}
$VERSION cagebreak-socket.7
* sha 256: ${cb256man7}
* sha 512: ${cb512man7}"
# email key
if [[ "${hashesdoc}" = "${testdoc}" ]]
then
echo "[x] Hashes.md"
else
RESULT=1
echo "[ ] Hashes.md"
fi
exit "${RESULT}"