From 8d0991d7d7d7e68ef39fe8d302f43110ef2c65d1 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 29 Aug 2005 22:38:12 -0700 Subject: [PATCH] Allow asciidoc formatted documentation in howto/ Signed-off-by: Junio C Hamano --- Documentation/Makefile | 9 ++++++++- Documentation/howto-index.sh | 9 ++++++++- Documentation/install-webdoc.sh | 4 ++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index bd6833b7..cc891748 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -45,7 +45,7 @@ git-diff-%.txt: diff-format.txt diff-options.txt touch $@ clean: - rm -f *.xml *.html *.1 *.7 howto-index.txt + rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html %.html : %.txt asciidoc -b xhtml11 -d manpage $< @@ -74,5 +74,12 @@ howto-index.html: howto-index.txt WEBDOC_DEST = /pub/software/scm/git/docs +DOC_HTML += howto/revert-branch-rebase.html + +$(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt + rm -f $@+ $@ + sed -e '1,/^$$/d' $? | asciidoc -b xhtml11 - >$@+ + mv $@+ $@ + install-webdoc : html sh ./install-webdoc.sh $(WEBDOC_DEST) diff --git a/Documentation/howto-index.sh b/Documentation/howto-index.sh index f9d3e57a..34aa30c5 100755 --- a/Documentation/howto-index.sh +++ b/Documentation/howto-index.sh @@ -41,7 +41,14 @@ do q }' "$txt"` - echo "* link:$txt[$title] $from + if grep 'Content-type: text/asciidoc' >/dev/null $txt + then + file=`expr "$txt" : '\(.*\)\.txt$'`.html + else + file="$txt" + fi + + echo "* link:$file[$title] $from $abstract " diff --git a/Documentation/install-webdoc.sh b/Documentation/install-webdoc.sh index 1f534f1e..e51a40ee 100755 --- a/Documentation/install-webdoc.sh +++ b/Documentation/install-webdoc.sh @@ -2,7 +2,7 @@ T="$1" -for h in *.html howto/*.txt +for h in *.html howto/*.txt howto/*.html do diff -u "$T/$h" "$h" || { echo >&2 "# install $h $T/$h" @@ -12,7 +12,7 @@ do } done strip_leading=`echo "$T/" | sed -e 's|.|.|g'` -for th in "$T"/*.html "$T"/howto/*.txt +for th in "$T"/*.html "$T"/howto/*.txt "$T"/howto/*.html do h=`expr "$th" : "$strip_leading"'\(.*\)'` case "$h" in -- 2.11.0