arm64/sve: Refactor user SVE trap maintenance for external use
[linux/fpc-iii.git] / scripts / documentation-file-ref-check
blobbc1659900e891806d1066a098b484ba481b54932
1 #!/bin/sh
2 # Treewide grep for references to files under Documentation, and report
3 # non-existing files in stderr.
5 for f in $(git ls-files); do
6 for ref in $(grep -ho "Documentation/[A-Za-z0-9_.,~/*+-]*" "$f"); do
7 # presume trailing . and , are not part of the name
8 ref=${ref%%[.,]}
10 # use ls to handle wildcards
11 if ! ls $ref >/dev/null 2>&1; then
12 echo "$f: $ref" >&2
14 done
15 done