blob: f516c670bf6100905e143376393f72dbd057b12a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
$NetBSD: patch-aa,v 1.2 2008/11/10 23:01:38 wiz Exp $
This patch makes "xmlto txt" usable on pkgsrc systems, which usually do
not have these binaries in /usr/bin.
--- format/docbook/txt.orig 2008-05-24 17:43:05.000000000 +0000
+++ format/docbook/txt
@@ -1,16 +1,16 @@
case "$USE_BACKEND" in
DEFAULT|DBLATEX)
- if [ -x /usr/bin/w3m ]
+ if (type w3m 1>/dev/null 2>&1)
then
- CONVERT=/usr/bin/w3m
+ CONVERT=w3m
ARGS="-T text/html -dump"
- elif [ -x /usr/bin/lynx ]
+ elif (type lynx 1>/dev/null 2>&1)
then
- CONVERT=/usr/bin/lynx
+ CONVERT=lynx
ARGS="-force_html -dump -nolist -width=72"
- elif [ -x /usr/bin/links ]
+ elif (type links 1>/dev/null 2>&1)
then
- CONVERT=/usr/bin/links
+ CONVERT=links
ARGS="-dump"
else
echo >&2 "No way to convert HTML to text found."
|