feat: implement apply and rollback patch scripts / 實作 apply 與 rollback patch 腳本

This commit is contained in:
Alice (OpenClaw)
2026-05-13 12:41:44 +08:00
parent ae096bcbc2
commit e610f5f930
2 changed files with 115 additions and 16 deletions

View File

@@ -1,11 +1,22 @@
#!/usr/bin/env bash
set -euo pipefail
echo "reply-end-controls PoC patch rollback"
echo
echo "This is a skeleton script."
echo "Its intended future role is to revert the documented OpenClaw runtime patch set from a target test environment."
echo
echo "Before implementing this script fully, consult:"
echo "- reports/openclaw-patch-inventory.md"
echo "- telegram-openclaw-poc-plan.md"
if [[ $# -lt 1 ]]; then
echo "usage: $0 <openclaw-dist-dir>" >&2
exit 1
fi
DIST_DIR="$1"
SEND_JS="${DIST_DIR}/send-sxDwUGaO.js"
BOT_JS="${DIST_DIR}/bot-Ce301bOE.js"
for file in "${SEND_JS}" "${BOT_JS}"; do
backup="${file}.reply-end-controls.bak"
if [[ -f "${backup}" ]]; then
cp "${backup}" "${file}"
else
echo "missing backup: ${backup}" >&2
fi
done
echo "reply-end-controls PoC patch rolled back from ${DIST_DIR}"