File: check_xml

package info (click to toggle)
auto-multiple-choice 1.7.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 92,612 kB
  • sloc: perl: 26,752; xml: 24,889; cpp: 1,997; python: 895; makefile: 569; sh: 233; ansic: 195
file content (20 lines) | stat: -rwxr-xr-x 374 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /bin/bash

RESULT_FILE=/tmp/amc-check-xml.log
FAILS=0

echo "Checks validity of XML files from documentation..."

for x in *.in.xml
do
    if xmllint --valid --noout $x >$RESULT_FILE 2>&1
    then
        echo -e "[ \e[0;32mOK\e[0m ] $x"
    else
        echo -e "[\e[0;31mFAIL\e[0m] $x"
        sed ' s/^/       /;' $RESULT_FILE
        FAILS=1
    fi
done

exit $FAILS