forked from ElektraInitiative/libelektra
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_validate.sh
More file actions
executable file
·31 lines (22 loc) · 805 Bytes
/
Copy pathtest_validate.sh
File metadata and controls
executable file
·31 lines (22 loc) · 805 Bytes
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
31
#!/bin/sh
VALIDATOR=/usr/bin/xmllint
[ "z$srcdir" = 'z' ] && srcdir=$(dirname "$0")
SCHEMA=$srcdir/xmlschema/elektra.xsd
if [ ! -f "$SCHEMA" ]; then
echo "Schema $SCHEMA not found, will do nothing"
exit 0
fi
if [ ! -x "$VALIDATOR" ]; then
echo "Tool $VALIDATOR not found, will do nothing"
exit 0
fi
echo
echo ELEKTRA VALIDATE TESTS
echo ========================================
echo
$VALIDATOR --schema "$SCHEMA" "$srcdir"/xmltool/key.xml > /dev/null || exit 5
$VALIDATOR --schema "$SCHEMA" "$srcdir"/xmltool/keyset.xml > /dev/null || exit 5
$VALIDATOR --schema "$SCHEMA" "$srcdir"/xmltool/filesys.xml > /dev/null || exit 5
$VALIDATOR --schema "$SCHEMA" "$srcdir"/xmltool/fstab.xml > /dev/null || exit 5
$VALIDATOR --schema "$SCHEMA" "$srcdir"/xmltool/passwd.xml > /dev/null || exit 5
exit 0