2022-08-13 21:05:16 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -e -u
|
2023-11-24 02:45:03 +00:00
|
|
|
dirname="$(dirname "$0")"
|
2022-08-13 21:05:16 +00:00
|
|
|
output_dir="$1"
|
|
|
|
|
2023-11-15 10:31:06 +00:00
|
|
|
find_files_to_analyze() {
|
2022-11-26 08:16:55 +00:00
|
|
|
find "$output_dir" -type f -name '*.xhtml' -o -name '*.svg' \
|
2022-08-13 21:05:16 +00:00
|
|
|
| grep -Ev '(bimi\.svg|search/index\.x?html)$'
|
|
|
|
}
|
|
|
|
|
2023-11-24 02:45:03 +00:00
|
|
|
# files_to_analyze="$(find_files_to_analyze)"
|
2023-11-15 10:31:06 +00:00
|
|
|
|
2022-08-13 21:05:16 +00:00
|
|
|
# we skip the BIMI icon (VNU can't handle SVG 1.2) and the search page (it has raw templates).
|
2023-11-24 02:45:03 +00:00
|
|
|
find_files_to_analyze \
|
|
|
|
| xargs vnu --stdout --format json --also-check-svg \
|
|
|
|
| sh "$dirname/filter-vnu.sh"
|