|
|
#!/bin/bash |
|
|
set -euo pipefail |
|
|
|
|
|
MODEL_FILE="model.safetensors" |
|
|
SHA_FILE="model.safetensors.sha256" |
|
|
SIG_FILE="model.safetensors.sig" |
|
|
|
|
|
if [ ! -f "$MODEL_FILE" ]; then |
|
|
echo "Model file not found: $MODEL_FILE" |
|
|
exit 1 |
|
|
fi |
|
|
|
|
|
if [ ! -f "$SHA_FILE" ]; then |
|
|
echo "SHA file not found: $SHA_FILE" |
|
|
exit 1 |
|
|
fi |
|
|
|
|
|
echo "Verifying SHA-256 checksum..." |
|
|
sha256sum -c "$SHA_FILE" |
|
|
|
|
|
if [ -f "$SIG_FILE" ]; then |
|
|
echo "Verifying PGP signature (requires maintainer public key installed)..." |
|
|
gpg --verify "$SIG_FILE" "$MODEL_FILE" |
|
|
else |
|
|
echo "Signature file not found: $SIG_FILE (skipping signature verification)" |
|
|
fi |
|
|
|
|
|
echo "Verification complete." |
|
|
|