Files
cnc/wasm-port/tools/extract_sources.sh
cnc a0810b8598 推进LinuxCNC WASM最小解释器验证
结论:新增独立 wasm-port 工作区,修复 native probes include 路径,最小解释器 harness 已可验证 G0 直线快速、G1 进给和 SET_FEED_RATE canonical event。检查:git diff --check 通过;wasm-port/tests/native/verify_native_probes.sh 通过。
2026-06-06 22:26:27 +08:00

36 lines
768 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
UPSTREAM_DIR="$ROOT_DIR/../linuxcnc"
VENDOR_DIR="$ROOT_DIR/vendor/linuxcnc"
MANIFEST_FILE="$ROOT_DIR/tools/source-manifest.txt"
copy_file() {
local src_rel="$1"
local src="$UPSTREAM_DIR/$src_rel"
local dst="$VENDOR_DIR/$src_rel"
if [[ ! -f "$src" ]]; then
echo "missing upstream file: $src" >&2
exit 1
fi
mkdir -p "$(dirname "$dst")"
cp "$src" "$dst"
echo "copied $src_rel"
}
if [[ ! -f "$MANIFEST_FILE" ]]; then
echo "missing manifest: $MANIFEST_FILE" >&2
exit 1
fi
while IFS= read -r src_rel; do
[[ -z "$src_rel" ]] && continue
[[ "${src_rel:0:1}" == "#" ]] && continue
copy_file "$src_rel"
done < "$MANIFEST_FILE"
echo "extraction complete"