2022-08-13 21:05:16 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -e -u
|
|
|
|
pwd="$(dirname "$0")"
|
|
|
|
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-15 10:31:06 +00:00
|
|
|
files_to_analyze="$(find_files_to_analyze)"
|
|
|
|
|
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).
|
|
|
|
vnu \
|
|
|
|
--stdout \
|
|
|
|
--format json \
|
|
|
|
--also-check-svg \
|
2023-11-15 10:31:06 +00:00
|
|
|
$files_to_analyze \
|
2022-08-13 21:05:16 +00:00
|
|
|
| sh "$pwd/filter-vnu.sh"
|