From: panne Date: Thu, 18 May 2000 17:15:46 +0000 (+0000) Subject: [project @ 2000-05-18 17:15:46 by panne] X-Git-Tag: Approximately_9120_patches~4428 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=sidebyside;h=38a56574dada402d15813582610a6e9b1595251c;p=ghc-hetmet.git [project @ 2000-05-18 17:15:46 by panne] * A shell-classic: Inserted space before ] (the lexical syntax of shells is always resource of miracles...) * Made searching for a catalog a little bit more cunning: If SGML_CATALOG_FILES is not set, try FPTOOLS_CATALOG_FILE, then /usr/share/sgml/CATALOG.docbkdsl, the SuSE-Linux default, don't know about Red Hat, Debian, etc. This way "make dvi html pdf ps rtf" works out of the box, at least for me. :-) --- diff --git a/glafp-utils/docbook/db2dvi.dir/db2dvi.sh b/glafp-utils/docbook/db2dvi.dir/db2dvi.sh index 013d071..1f59e70 100644 --- a/glafp-utils/docbook/db2dvi.dir/db2dvi.sh +++ b/glafp-utils/docbook/db2dvi.dir/db2dvi.sh @@ -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 # Dave Mason's option to specify a different stylesheet diff --git a/glafp-utils/docbook/db2html.dir/db2html.sh b/glafp-utils/docbook/db2html.dir/db2html.sh index b7337cb..383e127 100644 --- a/glafp-utils/docbook/db2html.dir/db2html.sh +++ b/glafp-utils/docbook/db2html.dir/db2html.sh @@ -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 HTML_STYLESHEET=$HTML_DIR/html/docbook.css diff --git a/glafp-utils/docbook/db2pdf.dir/db2pdf.sh b/glafp-utils/docbook/db2pdf.dir/db2pdf.sh index 07f762a..c7c259d 100644 --- a/glafp-utils/docbook/db2pdf.dir/db2pdf.sh +++ b/glafp-utils/docbook/db2pdf.dir/db2pdf.sh @@ -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//'` diff --git a/glafp-utils/docbook/db2rtf.dir/db2rtf.sh b/glafp-utils/docbook/db2rtf.dir/db2rtf.sh index dc90e49..48b3521 100644 --- a/glafp-utils/docbook/db2rtf.dir/db2rtf.sh +++ b/glafp-utils/docbook/db2rtf.dir/db2rtf.sh @@ -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 output=db2rtf.rtf