zhuyuan-ice-gl-zy001/BRIDGE/channel-env/ICE-CH-ZC001-CHANNEL-ENV-0001/zy-spill-check.sh

18 lines
955 B
Shell
Executable file
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# zy-spill-check —— 语言频道洒水检测(瞄点00084 一碗水架子模型)
# 用法:bash zy-spill-check.sh PASS=架子平稳可执行;ALARM=水已洒,停手先修环境
E="$(cd "$(dirname "$0")" && pwd)"
fail=0
while read -r hash path; do
[ -z "$path" ] && continue
if [ ! -f "$path" ]; then echo "ALARM 架子断腿(文件消失): $path"; fail=1; continue; fi
cur=$(shasum -a 256 "$path" | awk '{print $1}')
if [ "$cur" != "$hash" ]; then echo "ALARM 架子偏移(哈希漂移): $path"; fail=1; fi
done < "$E/rack-manifest.sha256"
if [ $fail -eq 0 ]; then
echo "SPILL-CHECK PASS 架子平稳,水面完整。执行前请通读 water-substrate.md——它是环境,不是资料。"
exit 0
else
echo "水洒了。停手:①跑 git diff / 重读锚点原文定位哪条腿动了 ②修正或重新登记 ③重跑本检测 PASS 后才准继续干活。摘要在此时不可信,回锚点。"
exit 1
fi