高效率推进 LinuxCNC 源码对齐流程
说明:集中 LinuxCNC 源码清单与 wasm/native probe 的路径解析,补强 manifest、shim、source-link 检查,并保持 LinuxCNC 源码后端对齐验证流程可复用。 验证:./test-native.sh;./test-linuxcnc-source-link.sh;./test-all-native.sh;wasm source/probe 相关脚本。
This commit is contained in:
45
list-linuxcnc-wasm-safe-shims.sh
Executable file
45
list-linuxcnc-wasm-safe-shims.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
filter=${1:-}
|
||||
|
||||
awk '
|
||||
/set\(linuxcnc_wasm_safe_probe_shims/ {
|
||||
in_list = 1
|
||||
next
|
||||
}
|
||||
in_list && /^[[:space:]]*\)/ {
|
||||
exit
|
||||
}
|
||||
in_list {
|
||||
line = $0
|
||||
sub(/^[[:space:]]*/, "", line)
|
||||
sub(/[[:space:]]*$/, "", line)
|
||||
if (line == "") {
|
||||
next
|
||||
}
|
||||
sub(/^\$\{CMAKE_CURRENT_SOURCE_DIR\}\//, "core/", line)
|
||||
print line
|
||||
}
|
||||
' core/CMakeLists.txt | while IFS= read -r source; do
|
||||
if [[ ! -f "$source" ]]; then
|
||||
echo "missing wasm-safe shim source: $source" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ -n "$filter" && "$(basename "$source")" != "$filter" ]]; then
|
||||
continue
|
||||
fi
|
||||
printf '%s\n' "$source"
|
||||
done | {
|
||||
found=0
|
||||
while IFS= read -r source; do
|
||||
found=1
|
||||
printf '%s\n' "$source"
|
||||
done
|
||||
if [[ -n "$filter" && "$found" -eq 0 ]]; then
|
||||
echo "missing wasm-safe shim in CMake list: $filter" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user