From b5d5680dc0129e7cbc9cc0685e36e46104ce6a25 Mon Sep 17 00:00:00 2001 From: Adam Di Carlo Date: Thu, 19 Dec 2002 22:13:58 +0000 Subject: [PATCH] if source is an XML file, and this is jade, then also include the XML declaration -- is that too clever by half? emit the jade cmdline we'll be running --- cvstools/runjade | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/cvstools/runjade b/cvstools/runjade index 7f45859c5..8dadb476b 100755 --- a/cvstools/runjade +++ b/cvstools/runjade @@ -29,4 +29,18 @@ if [ -f /share/doctypes/catalog ]; then CATALOGS="$CATALOGS -c /share/doctypes/catalog" fi -exec $JADE $CATALOGS -t $FORMAT -d $DSSSL $* $SOURCE +# if jade && file is XML, add the XML catalog +if [ `basename $JADE` = jade ] && [ ${SOURCE%.xml} != $SOURCE ]; then + for file in /usr/share/sgml/declaration/xml.dcl \ + /usr/share/sgml/declaration/xml.decl \ + /usr/lib/sgml/declaration/xml.dcl \ + /usr/lib/sgml/declaration/xml.decl ; do + if [ -f $file ]; then + DECL=$file + break + fi + done +fi + +echo $JADE $CATALOGS -t $FORMAT -d $DSSSL $* $DECL $SOURCE +exec $JADE $CATALOGS -t $FORMAT -d $DSSSL $* $DECL $SOURCE -- 2.50.1