3 # Copyright (c) The Tor Project, Inc.
4 # See LICENSE for licensing information
5 # Run this to generate .html.in or .1.in files from asciidoc files.
7 # html|man asciidocpath outputfile
17 if [ "$1" = "html" ]; then
18 input
=${output%%.html.in}.1.txt
19 base
=${output%%.html.in}
21 if [ "$2" != none
]; then
22 TZ
=UTC
"$2" -d manpage
-o "$output" "$input";
24 echo "==================================";
26 echo "You need asciidoc installed to be able to build the manpage.";
27 echo "To build without manpages, use the --disable-asciidoc argument";
28 echo "when calling configure.";
30 echo "==================================";
33 elif [ "$1" = "man" ]; then
34 input
=${output%%.1.in}.1.txt
37 if test "$2" = none
; then
38 echo "==================================";
40 echo "You need asciidoc installed to be able to build the manpage.";
41 echo "To build without manpages, use the --disable-asciidoc argument";
42 echo "when calling configure.";
44 echo "==================================";
47 if "$2" -f manpage
"$input"; then
48 mv "$base.1" "$output";
51 ==================================
52 You need a working asciidoc installed to be able to build the manpage.
54 a2x is installed, but for some reason it isn't working. Sometimes
55 this happens because required docbook support files are missing.
56 Please install docbook-xsl, docbook-xml, and xmlto (Debian) or
57 similar. If you use homebrew on Mac OS X, install the docbook formula
58 and add "export XML_CATALOG_FILES=/usr/local/etc/xml/catalog" to your
61 Alternatively, to build without manpages, use the --disable-asciidoc
62 argument when calling configure.
63 ==================================