2006-08-26 02:46:29 -07:00
|
|
|
#!/bin/sh
|
2006-08-26 16:24:54 -07:00
|
|
|
# "./check.sh somelang.lang" will validate somelang.lang file.
|
|
|
|
# "./check.sh" without arguments will validate lang and styles files
|
|
|
|
# specified here.
|
2006-08-26 02:46:29 -07:00
|
|
|
|
2006-08-28 21:27:37 -07:00
|
|
|
langs="automake.lang c.lang cpp.lang changelog.lang def.lang \
|
|
|
|
html.lang javascript.lang latex.lang makefile.lang \
|
|
|
|
xml.lang yacc.lang"
|
2006-08-26 04:17:24 -07:00
|
|
|
|
2006-08-26 02:46:29 -07:00
|
|
|
styles="gvim.styles kde.styles"
|
|
|
|
|
|
|
|
if [ $1 ]; then
|
|
|
|
langs=$*
|
|
|
|
styles=
|
|
|
|
fi
|
|
|
|
|
|
|
|
for file in $langs; do
|
|
|
|
if ! xmllint --relaxng language2.rng --noout $file ; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
for file in $styles; do
|
|
|
|
if ! xmllint --relaxng styles.rng --noout $file ; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done
|