#!/bin/sh # windows/sync.sh — refresh windows/pkg/ from root .lua sources (issue #18). # # Run BEFORE invoking the WiX build so the MSI bundles whatever is in # master. The .lua files in windows/pkg/ are regenerated on every run # and are gitignored — never edit them directly. # # Idempotent: re-running just re-copies. Safe to call from a Makefile, # a CI step, or by hand before `candle.exe + light.exe`. set -eu here=$(dirname "$(readlink -f "$0")") root=$(cd "$here/.." && pwd) for f in lmcp.lua server.lua json.lua; do if [ ! -f "$root/$f" ]; then echo "windows/sync.sh: missing source $root/$f" >&2 exit 1 fi cp "$root/$f" "$here/pkg/$f" echo " synced $f" done echo "windows/sync.sh: done — pkg/ matches root .lua at $(date +%Y-%m-%dT%H:%M:%S)"