File: check

package info (click to toggle)
qlcplus 4.14.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 58,644 kB
  • sloc: cpp: 182,867; javascript: 7,764; xml: 2,453; ansic: 2,120; sh: 1,716; python: 634; ruby: 606; makefile: 23
file content (30 lines) | stat: -rwxr-xr-x 864 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
DIR=`dirname $0`
set -e

# Validate the fixtures against the XML scheme
xmllint --noout --schema "$DIR"/../../schemas/fixture.xsd $(find "$DIR"/.. -name *.qxf) >/dev/null 2>&1 
RES=$?
if [ $RES -ne 0 ]; then
	# Re-Validate to print the error cause
	xmllint --noout --schema "$DIR"/../../schemas/fixture.xsd $(find "$DIR"/.. -name *.qxf) 2>&1 | grep -v " validates$"
	exit $RES
else
	echo "Fixtures: OK"
fi

cd "$DIR"/.. && ./scripts/fixtures-tool.py --validate || exit $?
cd - >>/dev/null

# Validate the fixture map against the XML scheme
xmllint --noout --schema "$DIR"/../../schemas/fixturesmap.xsd "$DIR"/../FixturesMap.xml >/dev/null 2>&1
RES=$?
if [ $RES -ne 0 ]; then
	# Re-Validate to print the error cause
	xmllint --noout --schema "$DIR"/../../schemas/fixturesmap.xsd "$DIR"/../FixturesMap.xml 2>&1
	exit $RES
else
	echo "Fixturesmap: OK"
fi