[project @ 2000-05-18 17:15:46 by panne]
[ghc-hetmet.git] / glafp-utils / docbook / db2pdf.dir / db2pdf.sh
index 07f762a..c7c259d 100644 (file)
@@ -1,11 +1,15 @@
-if [ -z "$SGML_CATALOG_FILES"]
-then
-  if [ ! -f "$FPTOOLS_CATALOG_FILE" ]
-  then
-    echo "CATALOG file not set up; see installation guide for details."
-    exit 1
-  fi
-  SGML_CATALOG_FILES=$FPTOOLS_CATALOG_FILE
+if [ -z "$SGML_CATALOG_FILES" ] ; then
+  for i in "$FPTOOLS_CATALOG_FILE" /usr/share/sgml/CATALOG.docbkdsl ; do
+    if [ -n "$i" -a -r "$i" ] ;  then
+      SGML_CATALOG_FILES="$i"
+      break
+    fi
+  done
+fi
+
+if [ -z "$SGML_CATALOG_FILES" ] ; then
+  echo "CATALOG file not set up; see installation guide for details."
+  exit 1
 fi
 
 TMPFN=`echo $1 | sed 's/\.sgml//'`