28 lines
597 B
Bash
28 lines
597 B
Bash
#!/bin/bash
|
|
# Verification script for spark profile checksum
|
|
# This script verifies the integrity of spark's output files
|
|
|
|
cd /root/.hermes/wizard-outputs/spark
|
|
|
|
# Compute and verify checksums
|
|
python3 -c "
|
|
import hashlib
|
|
import sys
|
|
|
|
files = ['results.txt', 'env-check.sh', 'checksum_verify.py', 'check_spark_profile.py']
|
|
|
|
errors = 0
|
|
for f in files:
|
|
try:
|
|
with open(f, 'rb') as fp:
|
|
h = hashlib.sha256(fp.read()).hexdigest()
|
|
print(f'OK: {f} -> {h[:16]}...')
|
|
except Exception as e:
|
|
print(f'ERROR: {f} - {e}')
|
|
errors = 1
|
|
|
|
sys.exit(errors)
|
|
"
|
|
|
|
exit $?
|