From 12175206c0bad0876c930446ce503c8ca444f866 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Thu, 4 Jun 2009 23:05:26 +1200 Subject: [PATCH] Collate and HTMLize the current Squid manual pages This is expected to create a *-manuals.tar.gz bundle like the cfgman bundle before it with raw and HTML versions of all man files currently in the Squid sources. For the purpose of providing web page versions as authorative reference documentation. This is one of those things that really has to be tested live on snapshot generation. I'm only sure that groff exists in the spots its needed and that the creation of the tar.gz should work. More work and testing will likely be needed before public pages are available. TODO: Test this alteration, and convert the bundle to live web pages. Add man .8 pages for many of the helpers. --- mksnapshot-cron.sh | 7 +++++++ mksnapshot.sh | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/mksnapshot-cron.sh b/mksnapshot-cron.sh index f8641c4535..de67b987a8 100755 --- a/mksnapshot-cron.sh +++ b/mksnapshot-cron.sh @@ -37,6 +37,9 @@ make_snapshot() *-langpack.tar.gz) type=-langpack.tar.gz ;; + *-manuals.tar.gz) + type=-manuals.tar.gz + ;; *) type=`echo $file | sed -e 's/.*\.tar\.gz/.tar.gz/' -e 's/.*\.tar\.bz2/.tar.bz2/' -e 's/.*\.patch/.patch/' -e 's/.*\.diff/.diff/' -e 's/.*-RELEASENOTES.html/-RELEASENOTES.html/' -e 's/^.*ChangeLog.txt$/-ChangeLog.txt/' -e 's/.*-cfgman/-cfgman/'` esac @@ -73,6 +76,10 @@ make_snapshot() rm -f $dst/cfgman.html.gz ln -s $dst/$file $dst/cfgman.html.gz ;; + *-manuals.tar.gz) + mkdir -p $dst/manuals + tar -C $dst/manuals -zxf $dst/$file + ;; esac done diff --git a/mksnapshot.sh b/mksnapshot.sh index 9a62902554..84009b9847 100755 --- a/mksnapshot.sh +++ b/mksnapshot.sh @@ -86,6 +86,7 @@ fi cp -p $tmpdir/ChangeLog ${PACKAGE}-${VERSION}-${date}-ChangeLog.txt echo ${PACKAGE}-${VERSION}-${date}-ChangeLog.txt >>${tag}.out +# Generate Configuration Manual HTML if [ -x $tmpdir/scripts/www/build-cfg-help.pl ]; then make -C $tmpdir/src cf.data mkdir -p $tmpdir/doc/cfgman @@ -97,6 +98,21 @@ if [ -x $tmpdir/scripts/www/build-cfg-help.pl ]; then echo ${PACKAGE}-${VERSION}-${date}-cfgman.html.gz >>${tag}.out fi +# Collate Manual Pages and generate HTML versions +if (groff --help); then + make -C $tmpdir/doc all + mkdir -p ${tmpdir}/doc/manuals + cp doc/*.8 ${tmpdir}/doc/manuals/ + for f in `ls -1 helpers/*/*/*.8` ; do + cp $f ${tmpdir}/doc/manuals/ + done + for f in `ls -1 ${tmpdir}/doc/manuals/*.8` ; do + cat ${f} | groff -E -Thtml -mandoc >${f}.html + done + sh -c "cd ${tmpdir}/doc/manuals && tar -zcf $PWD/${PACKAGE}-${VERSION}-${date}-manuals.tar.gz *" + echo ${PACKAGE}-${VERSION}-${date}-manuals.tar.gz >>${tag}.out +fi + # Generate language-pack tarballs # NP: Only to be done on HEAD branch. if test "${VERSION}" = "3.HEAD" ; then -- 2.47.3