Skip to content

Instantly share code, notes, and snippets.

Created Apr 7, 2021
What would you like to do?
Verify an Apache TomEE binary
FILE="${1?Specify a TomEE zip, war or tar.gz to verify}"
[ -f "$SHA" ] || {
echo "Downloading sha512 for $FILE"
BIN="$(basename "$FILE")"
VER="$(echo "$BIN" | perl -pe 's,apache-(tomee-.*?)-[a-z]+\.(zip|tar.gz|war),$1,')"
curl -s "$VER/$BIN.sha512" > "$SHA"
echo "$(cat $SHA) $FILE" | sha512sum -c - || {
echo "SHA-512 check failed: $FILE"
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment