This commit is contained in:
csj
2026-09-16 16:06:21 +08:00
parent b2c7b28e22
commit 7fea2063aa
18 changed files with 815 additions and 36 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
set -euo pipefail
ENGINE="$(cd "$(dirname "$0")" && pwd)"
BINARY="$ENGINE/dist/receipt-engine-helper.app/Contents/MacOS/receipt-engine-helper"
STAMP="$ENGINE/dist/receipt-engine-helper.source.sha256"
SOURCE_HASH="$(bash "$ENGINE/engine-fingerprint.sh")"
if [ -x "$BINARY" ] && [ -f "$STAMP" ]; then
BINARY_HASH="$(shasum -a 256 "$BINARY" | cut -d ' ' -f 1)"
if [ "$(cat "$STAMP")" = "$(printf '%s\n%s' "$SOURCE_HASH" "$BINARY_HASH")" ]; then
echo "本地引擎与当前源码一致。"
exit 0
fi
fi
echo "本地引擎缺失或已过期,正在重新打包并验证导出功能…"
bash "$ENGINE/build-engine.sh"