按提示词结论补源路径依据锁

This commit is contained in:
cnc
2026-06-02 14:06:59 +08:00
parent dda5b4973e
commit 854cc682b3
4 changed files with 22 additions and 0 deletions

View File

@@ -3,6 +3,9 @@ set -euo pipefail
cd "$(dirname "$0")"
# LinuxCNC source basis: manifest listers expose LinuxCNC-root relative source
# entries from RS274, kinematics, remap, config, tooldata, and metadata
# manifests after check-linuxcnc-inputs.sh validates their source coverage.
manifest=${1:?manifest required}
filter_group=${2:?filter group required}
output_mode=${3:?output mode required}
@@ -52,6 +55,10 @@ while IFS=: read -r group path note; do
echo "unknown manifest group: $group" >&2
exit 1
fi
if [[ "$path" = /* || "$path" == .. || "$path" == ../* || "$path" == */.. || "$path" == */../* ]]; then
echo "manifest source must be LinuxCNC-root relative: $path" >&2
exit 1
fi
full_path="$linuxcnc_root/$path"
if [[ ! -f "$full_path" ]]; then