comparison DOCS/xml/configure @ 31774:ba2ae47a445f

cosmetics: Use more compact "if .. then" shell syntax.
author diego
date Wed, 28 Jul 2010 08:01:22 +0000
parents 69eadc0c5372
children 12ef042165eb
comparison
equal deleted inserted replaced
31773:69eadc0c5372 31774:ba2ae47a445f
15 /usr/lib/sgml/catalog \ 15 /usr/lib/sgml/catalog \
16 /usr/local/lib/sgml/catalog \ 16 /usr/local/lib/sgml/catalog \
17 /usr/share/docbook-xml42/catalog.xml \ 17 /usr/share/docbook-xml42/catalog.xml \
18 /usr/share/sgml/docbook/xmlcatalog 18 /usr/share/sgml/docbook/xmlcatalog
19 do 19 do
20 if test -f "$try_catalog" 20 if test -f "$try_catalog"; then
21 then
22 catalog=$try_catalog 21 catalog=$try_catalog
23 break 22 break
24 fi 23 fi
25 done 24 done
26 25
27 if test -n "$catalog" 26 if test -n "$catalog"; then
28 then
29 echo "Found SGML catalog at $catalog" 27 echo "Found SGML catalog at $catalog"
30 else 28 else
31 echo "No SGML catalog found." 29 echo "No SGML catalog found."
32 fi 30 fi
33 31
45 /usr/share/sgml/docbook/xsl-stylesheets*/html/chunk.xsl \ 43 /usr/share/sgml/docbook/xsl-stylesheets*/html/chunk.xsl \
46 /usr/share/xml/docbook/stylesheet/nwalsh/current/html/chunk.xsl \ 44 /usr/share/xml/docbook/stylesheet/nwalsh/current/html/chunk.xsl \
47 /opt/local/share/xsl/docbook-xsl/html/chunk.xsl \ 45 /opt/local/share/xsl/docbook-xsl/html/chunk.xsl \
48 46
49 do 47 do
50 if test -f "$try_chunk_xsl" 48 if test -f "$try_chunk_xsl"; then
51 then
52 chunk_xsl=$try_chunk_xsl 49 chunk_xsl=$try_chunk_xsl
53 break 50 break
54 fi 51 fi
55 done 52 done
56 53
57 if test -z "$chunk_xsl" 54 if test -z "$chunk_xsl"; then
58 then
59 chunk_xsl=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl 55 chunk_xsl=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl
60 echo "Not found. Using default ($chunk_xsl)" 56 echo "Not found. Using default ($chunk_xsl)"
61 fake_chunk_xsl=yes 57 fake_chunk_xsl=yes
62 else 58 else
63 echo "Found chunk.xsl at $chunk_xsl" 59 echo "Found chunk.xsl at $chunk_xsl"
74 /usr/share/sgml/docbook/xsl-stylesheets*/html/docbook.xsl \ 70 /usr/share/sgml/docbook/xsl-stylesheets*/html/docbook.xsl \
75 /usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl \ 71 /usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl \
76 /opt/local/share/xsl/docbook-xsl/html/docbook.xsl \ 72 /opt/local/share/xsl/docbook-xsl/html/docbook.xsl \
77 73
78 do 74 do
79 if test -f "$try_docbook_xsl" 75 if test -f "$try_docbook_xsl"; then
80 then
81 docbook_xsl=$try_docbook_xsl 76 docbook_xsl=$try_docbook_xsl
82 break 77 break
83 fi 78 fi
84 done 79 done
85 80
86 if test -z "$docbook_xsl" 81 if test -z "$docbook_xsl"; then
87 then
88 docbook_xsl=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl 82 docbook_xsl=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl
89 echo "Not found. Using default ($docbook_xsl)" 83 echo "Not found. Using default ($docbook_xsl)"
90 else 84 else
91 echo "Found docbook.xsl at $docbook_xsl" 85 echo "Found docbook.xsl at $docbook_xsl"
92 fi 86 fi
130 /usr/share/sgml/docbook/dtd/xml/*/docbookx.dtd \ 124 /usr/share/sgml/docbook/dtd/xml/*/docbookx.dtd \
131 /usr/share/docbook-xml*/docbookx.dtd \ 125 /usr/share/docbook-xml*/docbookx.dtd \
132 /opt/local/share/xml/docbook*/*/docbookx.dtd \ 126 /opt/local/share/xml/docbook*/*/docbookx.dtd \
133 /usr/share/apps/ksgmltools2/docbook/*/docbookx.dtd 127 /usr/share/apps/ksgmltools2/docbook/*/docbookx.dtd
134 do 128 do
135 if test -f "$try_dtd" 129 if test -f "$try_dtd"; then
136 then
137 dtd=$try_dtd 130 dtd=$try_dtd
138 break 131 break
139 fi 132 fi
140 done 133 done
141 134
142 if test -z "$dtd" 135 if test -z "$dtd"; then
143 then
144 dtd=/usr/share/sgml/docbook/dtd/xml/4.1.2/docbookx.dtd 136 dtd=/usr/share/sgml/docbook/dtd/xml/4.1.2/docbookx.dtd
145 echo "Not found. Using default ($dtd)." 137 echo "Not found. Using default ($dtd)."
146 else 138 else
147 echo "Found docbookx.dtd at $dtd" 139 echo "Found docbookx.dtd at $dtd"
148 fi 140 fi
170 EOF 162 EOF
171 163
172 done 164 done
173 165
174 echo "Looking for a valid XSLT processor..." 166 echo "Looking for a valid XSLT processor..."
175 if xsltproc --version > /dev/null 2>&1 167 if xsltproc --version > /dev/null 2>&1; then
176 then 168 if test -z "$fake_chunk_xsl"; then
177 if test -z "$fake_chunk_xsl"
178 then
179 echo "Found xsltproc. If it works, it's probably the best choice." 169 echo "Found xsltproc. If it works, it's probably the best choice."
180 if test -n "$catalog" 170 if test -n "$catalog"; then
181 then
182 xsltcommand="xsltproc --catalogs -o \$\$1 \$\$2 \$\$3" 171 xsltcommand="xsltproc --catalogs -o \$\$1 \$\$2 \$\$3"
183 else 172 else
184 xsltcommand="xsltproc -o \$\$1 \$\$2 \$\$3" 173 xsltcommand="xsltproc -o \$\$1 \$\$2 \$\$3"
185 fi 174 fi
186 else 175 else