File: dtd_check.sh

package info (click to toggle)
sip-tester 1%3A3.7.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,932 kB
  • sloc: cpp: 29,383; xml: 13,436; ansic: 2,381; python: 2,218; sh: 505; makefile: 13
file content (16 lines) | stat: -rwxr-xr-x 316 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

failures=0
for file in $(find . -name '*.xml'); do
    if ! xmllint --path . --dtdvalid ./sipp.dtd $file >/dev/null; then
        echo "ERROR: $file failed validation"
        failures=$((failures+1))
    fi
done

if test $failures -ne 0; then
    echo "Not OK" >&2
    exit 1
fi

echo "All files OK" >&2