]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Collate and HTMLize the current Squid manual pages
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 4 Jun 2009 11:05:26 +0000 (23:05 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 4 Jun 2009 11:05:26 +0000 (23:05 +1200)
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
mksnapshot.sh

index f8641c453573c854117a1d83986e6f53194d3fb1..de67b987a889bc4872d795fcf556c0edca3d813d 100755 (executable)
@@ -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
 
index 9a62902554c0e13287b643ec20843a2dd6989f0f..84009b98472f43f96db5460011cbad4d2ccecfa6 100755 (executable)
@@ -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