Verify download.

This commit is contained in:
Nuno Cruces
2025-09-19 15:28:13 +01:00
parent cc353e4848
commit 4c24bd0cb6
3 changed files with 12 additions and 5 deletions

View File

@@ -4,8 +4,15 @@ set -euo pipefail
cd -P -- "$(dirname -- "$0")"
curl -#OL "https://sqlite.org/2025/sqlite-amalgamation-3500400.zip"
openssl dgst -sha3-256 sqlite-amalgamation-*.zip | \
grep f131b68e6ba5fb891cc13ebb5ff9555054c77294cb92d8d1268bad5dba4fa2a1
# Verify download.
if hash=$(openssl dgst -sha3-256 sqlite-amalgamation-*.zip); then
if ! [[ $hash =~ f131b68e6ba5fb891cc13ebb5ff9555054c77294cb92d8d1268bad5dba4fa2a1 ]]; then
echo $hash
exit 1
fi
fi 2> /dev/null
unzip -d . sqlite-amalgamation-*.zip
mv sqlite-amalgamation-*/sqlite3.c .
mv sqlite-amalgamation-*/sqlite3.h .