[project @ 2002-02-13 19:43:46 by sof]
[ghc-hetmet.git] / glafp-utils / docbook / db2rtf.dir / db2rtf.sh
index 9ed7e8f..3b32894 100644 (file)
@@ -1,8 +1,12 @@
-if [ ! -f "$DOCBOOK_CATALOG" ] ; then
+if [ ! -f "$DOCBOOK_CATALOG" ] && [ ! -f "$SGML_CATALOG_FILES" ] ; then
   echo "CATALOG file not set up; see installation guide for details."
   exit 1
 fi
 
+if [ -f "$DOCBOOK_CATALOG" ] ; then
+  CATALOG_OPTION=-c $DOCBOOK_CATALOG
+fi
+
 output=db2rtf.rtf
 
 # Dave Mason's option to specify a different stylesheet
@@ -33,7 +37,7 @@ then
   fi
 fi
 
-cat $* | $JADE -t rtf -d ${DB_STYLESHEET}\#print -c $DOCBOOK_CATALOG
+cat $* | $JADE -t rtf -d ${DB_STYLESHEET}\#print $CATALOG_OPTION
 
 if [ $# -eq 1 ]
 then