summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.am4
-rwxr-xr-xdoc/asciidoc-helper.sh13
2 files changed, 10 insertions, 7 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index cccc94823d..dbc44f0fbf 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -39,7 +39,7 @@ DIST_SUBDIRS = spec
# Generate the html documentation from asciidoc, but don't do
# machine-specific replacements yet
$(html_in) :
- $(top_srcdir)/doc/asciidoc-helper.sh html @ASCIIDOC@ @SED@ $(top_srcdir)/doc/$@
+ $(top_srcdir)/doc/asciidoc-helper.sh html @ASCIIDOC@ $(top_srcdir)/doc/$@
tor.html.in : tor.1.txt
torify.html.in : torify.1.txt
@@ -49,7 +49,7 @@ tor-resolve.html.in : tor-resolve.1.txt
# Generate the manpage from asciidoc, but don't do
# machine-specific replacements yet
$(man_in) :
- $(top_srcdir)/doc/asciidoc-helper.sh man @A2X@ @SED@ $(top_srcdir)/doc/$@
+ $(top_srcdir)/doc/asciidoc-helper.sh man @A2X@ $(top_srcdir)/doc/$@
tor.1.in : tor.1.txt
torify.1.in : torify.1.txt
diff --git a/doc/asciidoc-helper.sh b/doc/asciidoc-helper.sh
index 90a003d496..25b438cd81 100755
--- a/doc/asciidoc-helper.sh
+++ b/doc/asciidoc-helper.sh
@@ -4,19 +4,19 @@
# See LICENSE for licensing information
# Run this to generate .html.in or .1.in files from asciidoc files.
# Arguments:
-# html|man asciidocpath sedpath outputfile
+# html|man asciidocpath outputfile
set -e
-if [ $# != 4 ]; then
+if [ $# != 3 ]; then
exit 1;
fi
-output=$4
-input=`echo $output | $3 -e 's/html\.in$/1\.txt/g' -e 's/1\.in$/1\.txt/g'`
-base=`echo $output | $3 -e 's/\.html\.in$//g' -e 's/\.1\.in$//g'`
+output=$3
if [ "$1" = "html" ]; then
+ input=${output%%.html.in}.1.txt
+ base=${output%%.html.in}
if [ "$2" != none ]; then
"$2" -d manpage -o $output $input;
else
@@ -29,6 +29,9 @@ if [ "$1" = "html" ]; then
echo "==================================";
fi
elif [ "$1" = "man" ]; then
+ input=${output%%.1.in}.1.txt
+ base=${output%%.1.in}
+
if test "$2" != none; then
if $2 -f manpage $input; then
mv $base.1 $output;