Skip to content

Instantly share code, notes, and snippets.

@rm5248
Created December 29, 2023 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rm5248/b2abba4bb4f1d9cf518be49d064a0be1 to your computer and use it in GitHub Desktop.
Save rm5248/b2abba4bb4f1d9cf518be49d064a0be1 to your computer and use it in GitHub Desktop.
Validate Apache Release
#!/bin/sh
set -e
# BASE_DL example: https://dist.apache.org/repos/dist/dev/logging/log4cxx/
# ARCHIVE example: apache-log4cxx-1.2.0
BASE_DL=$1
ARCHIVE=$2
FULL_DL="$1/$2"
wget "$FULL_DL.tar.gz"
wget "$FULL_DL.tar.gz.asc"
wget "$FULL_DL.tar.gz.sha512"
wget "$FULL_DL.zip"
wget "$FULL_DL.zip.asc"
wget "$FULL_DL.zip.sha512"
echo "Validating SHA512..."
sha512sum --check $ARCHIVE.tar.gz.sha512
sha512sum --check $ARCHIVE.zip.sha512
echo "Validating signature..."
gpg --verify $ARCHIVE.tar.gz.asc
gpg --verify $ARCHIVE.zip.asc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment