#!/usr/bin/env bash set -Eeuo pipefail source_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd) subject=${source_root}/scripts/install-jd-pncc-runtime.sh bash -n "$subject" grep -Fq 'readonly node_id=JD-FD-PRIMARY' "$subject" grep -Fq 'readonly persona_id=ICE-P-ZY001' "$subject" grep -Fq 'readonly repository=/var/lib/guanghu/personas/ICE-P-ZY001/pncc/repository' "$subject" grep -Fq 'readonly runtime=/usr/local/libexec/guanghu/pncc-runtime.mjs' "$subject" grep -Fq 'Persona-Cognitive-Author: UNBOUND' "$subject" grep -Fq 'GUANGHU-PNCC-FIRST-CYCLE' "$subject" grep -Fq 'carrier_binding=UNBOUND_EVIDENCE_REQUIRED' "$subject" grep -Fq 'chmod -R go-rwx "$persona_root"' "$subject" grep -Fq 'git -C "$repository" status --porcelain --untracked-files=all' "$subject" if grep -Fq 'git push' "$subject"; then echo 'private persona repository must not be pushed to a public remote by the installer' >&2 exit 1 fi echo GUANGHU_PNCC_INSTALL_CONTRACT_OK