← back to Dw Theme Patches

TK-12166/restore.sh

9 lines

#!/usr/bin/env bash
# TK-12166 — UNDO: PUT the 2026-09-24 backup of the snippet back to the LIVE theme.
source "$(cd "$(dirname "$0")" && pwd)/_lib.sh"
BK="$HERE/product-description-meta.liquid.backup"; EXPECT="$(cat "$HERE/backup.sha256")"
[ "$(sha_of "$BK")" = "$EXPECT" ] || { echo "ABORT: backup file sha mismatch — backup corrupted"; exit 2; }
put_asset "$BK"
LIVE="$(mktemp)"; fetch_live "$LIVE"; AFTER="$(sha_of "$LIVE")"
echo "live sha256 after restore: $AFTER (expect $EXPECT)"; [ "$AFTER" = "$EXPECT" ] && echo "OK: restored." || { echo "WARN: mismatch"; exit 3; }