diff options
author | Joey Hess <joeyh@debian.org> | 2005-10-07 19:51:38 +0000 |
---|---|---|
committer | Joey Hess <joeyh@debian.org> | 2005-10-07 19:51:38 +0000 |
commit | 1ea73eea5ecc6a8ed901316049259aee737ee554 (patch) | |
tree | 03a077f0b1b1548f3c806bd1c5795964fba0fb52 /scripts/historic/validate.sh | |
download | installation-guide-1ea73eea5ecc6a8ed901316049259aee737ee554.zip |
move manual to top-level directory, split out of debian-installer package
Diffstat (limited to 'scripts/historic/validate.sh')
-rwxr-xr-x | scripts/historic/validate.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/historic/validate.sh b/scripts/historic/validate.sh new file mode 100755 index 000000000..bdb09989a --- /dev/null +++ b/scripts/historic/validate.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +catalog=/usr/share/sgml/docbook/dtd/xml/4.2/catalog +xmldcl=/usr/share/sgml/declaration/xml.dcl +err=`tempfile` + +if grep -q '^<!DOCTYPE' $1; then + nsgmls -s -c $catalog $xmldcl $1 2> $err +else + temp=`tempfile` + topdir=`dirname $0` + root=`sed -e '0,/<[a-z]/!d' $1 | sed -e '$!d' | sed -e 's/<\([a-z][a-zA-Z0-9]*\).*/\1/'` + cat > $temp <<EOT +<!DOCTYPE $root PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "docbookx.dtd" +[<!ENTITY % entities SYSTEM "entities.ent"> %entities;]> +EOT + cat $1 >> $temp + nsgmls -s -D$topdir -c $catalog $xmldcl $temp 2> $err + rm -f $temp +fi + +less $err
\ No newline at end of file |