Skip to content

Commit

Permalink
tools: log and check sha256sum for nghttp2
Browse files Browse the repository at this point in the history
  • Loading branch information
fasenderos committed May 20, 2023
1 parent 85ac915 commit c9797ab
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tools/dep_updaters/update-nghttp2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,20 @@ NGHTTP2_TARBALL="nghttp2-$NEW_VERSION.tar.gz"
cd "$WORKSPACE"

echo "Fetching nghttp2 source archive"
SOURCE_CHECKSUM=$(curl -sL "https://github.com/nghttp2/nghttp2/releases/download/$NGHTTP2_REF/checksums.txt" | grep $NGHTTP2_TARBALL)
curl -sL -o "$NGHTTP2_TARBALL" "https://github.com/nghttp2/nghttp2/releases/download/$NGHTTP2_REF/$NGHTTP2_TARBALL"
ARCHIVE_CHECKSUM=$(shasum -a256 $NGHTTP2_TARBALL)

if [ "$SOURCE_CHECKSUM" = "$ARCHIVE_CHECKSUM" ]; then
echo "Valid nghttp2 checksum $SOURCE_CHECKSUM"
else
echo "ERROR: Invalid checksum of the downloaded nghttp2 archive:"
echo ""
echo "Original: $SOURCE_CHECKSUM"
echo "Download: $ARCHIVE_CHECKSUM"
exit 1
fi

gzip -dc "$NGHTTP2_TARBALL" | tar xf -
rm "$NGHTTP2_TARBALL"
mv "nghttp2-$NEW_VERSION" nghttp2
Expand Down

0 comments on commit c9797ab

Please sign in to comment.