20 lines
897 B
Shell
20 lines
897 B
Shell
#!/usr/bin/env bash
|
|
set -Eeuo pipefail
|
|
|
|
source_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
|
|
subject=${source_root}/scripts/provision-jd-chengyan-pncc-slot.sh
|
|
persona=${source_root}/pncc-personas/chengyan
|
|
|
|
bash -n "$subject"
|
|
grep -Fq 'readonly persona_id=ICE-P-CY0903' "$subject"
|
|
grep -Fq 'readonly node_id=JD-FD-PRIMARY' "$subject"
|
|
grep -Fq 'diff -qr --exclude=.git "$source_dir" "$destination"' "$subject"
|
|
grep -Fq 'runuser -u guanghu -- git' "$subject"
|
|
grep -Fq 'carrier_binding=UNBOUND_EVIDENCE_REQUIRED' "$subject"
|
|
grep -Fq 'reality_execution_allowed=false' "$subject"
|
|
grep -Fq 'json.load(sys.stdin)' "$subject"
|
|
python3 -m json.tool "$persona/.hololake/persona/manifest.json" >/dev/null
|
|
for path in brain/ENTRY.hldp brain/B0.hldp checkpoints/CURRENT.hldp organs/read-current-self.hldp bindings/identity.hldp; do
|
|
[[ -s $persona/$path ]]
|
|
done
|
|
echo CHENGYAN_PNCC_PROVISION_CONTRACT_OK
|