118c2aff7Sartem# 2*bbf21555SRichard Lowe# hal-fdi-validate.sh : Validate one or more fdi(5) files 318c2aff7Sartem# 418c2aff7Sartem# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 518c2aff7Sartem# Use is subject to license terms. 618c2aff7Sartem# 718c2aff7Sartem# Licensed under the Academic Free License version 2.1 818c2aff7Sartem# 918c2aff7Sartem 1018c2aff7Sartemusage() { 1118c2aff7Sartem echo "Usage: hal-fdi-validate [-f dtd] file [file ...]" 1218c2aff7Sartem exit 1 1318c2aff7Sartem} 1418c2aff7Sartem 1518c2aff7Sartemif [ "$1" = "-f" ]; then 1618c2aff7Sartem if [ "foo$2" != "foo" ] ; then 1718c2aff7Sartem DTD="$2" 1818c2aff7Sartem shift 2 1918c2aff7Sartem else 2018c2aff7Sartem usage 2118c2aff7Sartem fi 2218c2aff7Sartemelse 2318c2aff7Sartem DTD="/usr/share/lib/xml/dtd/fdi.dtd.1" 2418c2aff7Sartemfi 2518c2aff7Sartem 2618c2aff7Sartemif [ $# -eq 0 ]; then 2718c2aff7Sartem usage 2818c2aff7Sartemfi 2918c2aff7Sartem 3018c2aff7Sartemxmllint --noout --dtdvalid $DTD $* 31