4
0

gendocs.sh 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  1. #!/bin/sh -e
  2. # gendocs.sh -- generate a GNU manual in many formats. This script is
  3. # mentioned in maintain.texi. See the help message below for usage details.
  4. scriptversion=2021-03-01.13
  5. # Copyright 2003-2023 Free Software Foundation, Inc.
  6. #
  7. # This program is free software: you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 3 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program. If not, see <https://www.gnu.org/licenses/>.
  19. #
  20. # Original author: Mohit Agarwal.
  21. # Send bug reports and any other correspondence to [email protected].
  22. #
  23. # The latest version of this script, and the companion template, is
  24. # available from the Gnulib repository:
  25. #
  26. # https://git.savannah.gnu.org/cgit/gnulib.git/tree/build-aux/gendocs.sh
  27. # https://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/gendocs_template
  28. # TODO:
  29. # - image importing was only implemented for HTML generated by
  30. # makeinfo. But it should be simple enough to adjust.
  31. # - images are not imported in the source tarball. All the needed
  32. # formats (PDF, PNG, etc.) should be included.
  33. prog=`basename "$0"`
  34. srcdir=`pwd`
  35. scripturl="https://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/gendocs.sh"
  36. templateurl="https://git.savannah.gnu.org/cgit/gnulib.git/plain/doc/gendocs_template"
  37. : ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
  38. : ${MAKEINFO="makeinfo"}
  39. : ${TEXI2DVI="texi2dvi"}
  40. : ${DOCBOOK2HTML="docbook2html"}
  41. : ${DOCBOOK2PDF="docbook2pdf"}
  42. : ${DOCBOOK2TXT="docbook2txt"}
  43. : ${GENDOCS_TEMPLATE_DIR="."}
  44. : ${PERL='perl'}
  45. : ${TEXI2HTML="texi2html"}
  46. unset CDPATH
  47. unset use_texi2html
  48. MANUAL_TITLE=
  49. PACKAGE=
  50. [email protected] # please override with --email
  51. commonarg= # passed to all makeinfo/texi2html invcations.
  52. dirargs= # passed to all tools (-I dir).
  53. dirs= # -I directories.
  54. htmlarg="--css-ref=/software/gnulib/manual.css -c TOP_NODE_UP_URL=/manual"
  55. default_htmlarg=true
  56. infoarg=--no-split
  57. generate_ascii=true
  58. generate_html=true
  59. generate_info=true
  60. generate_tex=true
  61. outdir=manual
  62. source_extra=
  63. split=node
  64. srcfile=
  65. texarg="-t @finalout"
  66. version="gendocs.sh $scriptversion
  67. Copyright 2021 Free Software Foundation, Inc.
  68. There is NO warranty. You may redistribute this software
  69. under the terms of the GNU General Public License.
  70. For more information about these matters, see the files named COPYING."
  71. usage="Usage: $prog [OPTION]... PACKAGE MANUAL-TITLE
  72. Generate output in various formats from PACKAGE.texinfo (or .texi or
  73. .txi) source. See the GNU Maintainers document for a more extensive
  74. discussion:
  75. https://www.gnu.org/prep/maintain_toc.html
  76. Options:
  77. --email ADR use ADR as contact in generated web pages; always give this.
  78. -s SRCFILE read Texinfo from SRCFILE, instead of PACKAGE.{texinfo|texi|txi}
  79. -o OUTDIR write files into OUTDIR, instead of manual/.
  80. -I DIR append DIR to the Texinfo search path.
  81. --common ARG pass ARG in all invocations.
  82. --html ARG pass ARG to makeinfo or texi2html for HTML targets,
  83. instead of '$htmlarg'.
  84. --info ARG pass ARG to makeinfo for Info, instead of --no-split.
  85. --no-ascii skip generating the plain text output.
  86. --no-html skip generating the html output.
  87. --no-info skip generating the info output.
  88. --no-tex skip generating the dvi and pdf output.
  89. --source ARG include ARG in tar archive of sources.
  90. --split HOW make split HTML by node, section, chapter; default node.
  91. --tex ARG pass ARG to texi2dvi for DVI and PDF, instead of -t @finalout.
  92. --texi2html use texi2html to make HTML target, with all split versions.
  93. --docbook convert through DocBook too (xml, txt, html, pdf).
  94. --help display this help and exit successfully.
  95. --version display version information and exit successfully.
  96. Simple example: $prog --email [email protected] emacs \"GNU Emacs Manual\"
  97. Typical sequence:
  98. cd PACKAGESOURCE/doc
  99. wget \"$scripturl\"
  100. wget \"$templateurl\"
  101. $prog --email BUGLIST MANUAL \"GNU MANUAL - One-line description\"
  102. Output will be in a new subdirectory \"manual\" (by default;
  103. use -o OUTDIR to override). Move all the new files into your web CVS
  104. tree, as explained in the Web Pages node of maintain.texi.
  105. Please use the --email ADDRESS option so your own bug-reporting
  106. address will be used in the generated HTML pages.
  107. MANUAL-TITLE is included as part of the HTML <title> of the overall
  108. manual/index.html file. It should include the name of the package being
  109. documented. manual/index.html is created by substitution from the file
  110. $GENDOCS_TEMPLATE_DIR/gendocs_template. (Feel free to modify the
  111. generic template for your own purposes.)
  112. If you have several manuals, you'll need to run this script several
  113. times with different MANUAL values, specifying a different output
  114. directory with -o each time. Then write (by hand) an overall index.html
  115. with links to them all.
  116. If a manual's Texinfo sources are spread across several directories,
  117. first copy or symlink all Texinfo sources into a single directory.
  118. (Part of the script's work is to make a tar.gz of the sources.)
  119. As implied above, by default monolithic Info files are generated.
  120. If you want split Info, or other Info options, use --info to override.
  121. You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML,
  122. and PERL to control the programs that get executed, and
  123. GENDOCS_TEMPLATE_DIR to control where the gendocs_template file is
  124. looked for. With --docbook, the environment variables DOCBOOK2HTML,
  125. DOCBOOK2PDF, and DOCBOOK2TXT are also consulted.
  126. By default, makeinfo and texi2dvi are run in the default (English)
  127. locale, since that's the language of most Texinfo manuals. If you
  128. happen to have a non-English manual and non-English web site, see the
  129. SETLANG setting in the source.
  130. Email bug reports or enhancement requests to [email protected].
  131. "
  132. while test $# -gt 0; do
  133. case $1 in
  134. -s) shift; srcfile=$1;;
  135. -o) shift; outdir=$1;;
  136. -I) shift; dirargs="$dirargs -I '$1'"; dirs="$dirs $1";;
  137. --common) shift; commonarg=$1;;
  138. --docbook) docbook=yes;;
  139. --email) shift; EMAIL=$1;;
  140. --html) shift; default_htmlarg=false; htmlarg=$1;;
  141. --info) shift; infoarg=$1;;
  142. --no-ascii) generate_ascii=false;;
  143. --no-html) generate_ascii=false;;
  144. --no-info) generate_info=false;;
  145. --no-tex) generate_tex=false;;
  146. --source) shift; source_extra=$1;;
  147. --split) shift; split=$1;;
  148. --tex) shift; texarg=$1;;
  149. --texi2html) use_texi2html=1;;
  150. --help) echo "$usage"; exit 0;;
  151. --version) echo "$version"; exit 0;;
  152. -*)
  153. echo "$0: Unknown option \`$1'." >&2
  154. echo "$0: Try \`--help' for more information." >&2
  155. exit 1;;
  156. *)
  157. if test -z "$PACKAGE"; then
  158. PACKAGE=$1
  159. elif test -z "$MANUAL_TITLE"; then
  160. MANUAL_TITLE=$1
  161. else
  162. echo "$0: extra non-option argument \`$1'." >&2
  163. exit 1
  164. fi;;
  165. esac
  166. shift
  167. done
  168. # makeinfo uses the dirargs, but texi2dvi doesn't.
  169. commonarg=" $dirargs $commonarg"
  170. # For most of the following, the base name is just $PACKAGE
  171. base=$PACKAGE
  172. if $default_htmlarg && test -n "$use_texi2html"; then
  173. # The legacy texi2html doesn't support TOP_NODE_UP_URL
  174. htmlarg="--css-ref=/software/gnulib/manual.css"
  175. fi
  176. if test -n "$srcfile"; then
  177. # but here, we use the basename of $srcfile
  178. base=`basename "$srcfile"`
  179. case $base in
  180. *.txi|*.texi|*.texinfo) base=`echo "$base"|sed 's/\.[texinfo]*$//'`;;
  181. esac
  182. PACKAGE=$base
  183. elif test -s "$srcdir/$PACKAGE.texinfo"; then
  184. srcfile=$srcdir/$PACKAGE.texinfo
  185. elif test -s "$srcdir/$PACKAGE.texi"; then
  186. srcfile=$srcdir/$PACKAGE.texi
  187. elif test -s "$srcdir/$PACKAGE.txi"; then
  188. srcfile=$srcdir/$PACKAGE.txi
  189. else
  190. echo "$0: cannot find .texinfo or .texi or .txi for $PACKAGE in $srcdir." >&2
  191. exit 1
  192. fi
  193. if test ! -r $GENDOCS_TEMPLATE_DIR/gendocs_template; then
  194. echo "$0: cannot read $GENDOCS_TEMPLATE_DIR/gendocs_template." >&2
  195. echo "$0: it is available from $templateurl." >&2
  196. exit 1
  197. fi
  198. # Function to return size of $1 in something resembling kilobytes.
  199. calcsize()
  200. {
  201. size=`ls -ksl $1 | awk '{print $1}'`
  202. echo $size
  203. }
  204. # copy_images OUTDIR HTML-FILE...
  205. # -------------------------------
  206. # Copy all the images needed by the HTML-FILEs into OUTDIR.
  207. # Look for them in . and the -I directories; this is simpler than what
  208. # makeinfo supports with -I, but hopefully it will suffice.
  209. copy_images()
  210. {
  211. local odir
  212. odir=$1
  213. shift
  214. $PERL -n -e "
  215. BEGIN {
  216. \$me = '$prog';
  217. \$odir = '$odir';
  218. @dirs = qw(. $dirs);
  219. }
  220. " -e '
  221. /<img src="(.*?)"/g && ++$need{$1};
  222. END {
  223. #print "$me: @{[keys %need]}\n"; # for debugging, show images found.
  224. FILE: for my $f (keys %need) {
  225. for my $d (@dirs) {
  226. if (-f "$d/$f") {
  227. use File::Basename;
  228. my $dest = dirname ("$odir/$f");
  229. #
  230. use File::Path;
  231. -d $dest || mkpath ($dest)
  232. || die "$me: cannot mkdir $dest: $!\n";
  233. #
  234. use File::Copy;
  235. copy ("$d/$f", $dest)
  236. || die "$me: cannot copy $d/$f to $dest: $!\n";
  237. next FILE;
  238. }
  239. }
  240. die "$me: $ARGV: cannot find image $f\n";
  241. }
  242. }
  243. ' -- "$@" || exit 1
  244. }
  245. case $outdir in
  246. /*) abs_outdir=$outdir;;
  247. *) abs_outdir=$srcdir/$outdir;;
  248. esac
  249. echo "Making output for $srcfile"
  250. echo " in `pwd`"
  251. mkdir -p "$outdir/"
  252. #
  253. if $generate_info; then
  254. cmd="$SETLANG $MAKEINFO -o $PACKAGE.info $commonarg $infoarg \"$srcfile\""
  255. echo "Generating info... ($cmd)"
  256. rm -f $PACKAGE.info* # get rid of any strays
  257. eval "$cmd"
  258. tar czf "$outdir/$PACKAGE.info.tar.gz" $PACKAGE.info*
  259. ls -l "$outdir/$PACKAGE.info.tar.gz"
  260. info_tgz_size=`calcsize "$outdir/$PACKAGE.info.tar.gz"`
  261. # do not mv the info files, there's no point in having them available
  262. # separately on the web.
  263. fi # end info
  264. #
  265. if $generate_tex; then
  266. cmd="$SETLANG $TEXI2DVI $dirargs $texarg \"$srcfile\""
  267. printf "\nGenerating dvi... ($cmd)\n"
  268. eval "$cmd"
  269. # compress/finish dvi:
  270. gzip -f -9 $PACKAGE.dvi
  271. dvi_gz_size=`calcsize $PACKAGE.dvi.gz`
  272. mv $PACKAGE.dvi.gz "$outdir/"
  273. ls -l "$outdir/$PACKAGE.dvi.gz"
  274. cmd="$SETLANG $TEXI2DVI --pdf $dirargs $texarg \"$srcfile\""
  275. printf "\nGenerating pdf... ($cmd)\n"
  276. eval "$cmd"
  277. pdf_size=`calcsize $PACKAGE.pdf`
  278. mv $PACKAGE.pdf "$outdir/"
  279. ls -l "$outdir/$PACKAGE.pdf"
  280. fi # end tex (dvi + pdf)
  281. #
  282. if $generate_ascii; then
  283. opt="-o $PACKAGE.txt --no-split --no-headers $commonarg"
  284. cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
  285. printf "\nGenerating ascii... ($cmd)\n"
  286. eval "$cmd"
  287. ascii_size=`calcsize $PACKAGE.txt`
  288. gzip -f -9 -c $PACKAGE.txt >"$outdir/$PACKAGE.txt.gz"
  289. ascii_gz_size=`calcsize "$outdir/$PACKAGE.txt.gz"`
  290. mv $PACKAGE.txt "$outdir/"
  291. ls -l "$outdir/$PACKAGE.txt" "$outdir/$PACKAGE.txt.gz"
  292. fi
  293. #
  294. if $generate_html; then
  295. # Split HTML at level $1. Used for texi2html.
  296. html_split()
  297. {
  298. opt="--split=$1 --node-files $commonarg $htmlarg"
  299. cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $opt \"$srcfile\""
  300. printf "\nGenerating html by $1... ($cmd)\n"
  301. eval "$cmd"
  302. split_html_dir=$PACKAGE.html
  303. (
  304. cd ${split_html_dir} || exit 1
  305. if [ ! -f index.html ]; then
  306. ln -sf ${PACKAGE}.html index.html
  307. fi
  308. tar -czf "$abs_outdir/${PACKAGE}.html_$1.tar.gz" -- *.html
  309. )
  310. eval html_$1_tgz_size=`calcsize "$outdir/${PACKAGE}.html_$1.tar.gz"`
  311. rm -f "$outdir"/html_$1/*.html
  312. mkdir -p "$outdir/html_$1/"
  313. mv ${split_html_dir}/*.html "$outdir/html_$1/"
  314. rmdir ${split_html_dir}
  315. }
  316. if test -z "$use_texi2html"; then
  317. opt="--no-split --html -o $PACKAGE.html $commonarg $htmlarg"
  318. cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
  319. printf "\nGenerating monolithic html... ($cmd)\n"
  320. rm -rf $PACKAGE.html # in case a directory is left over
  321. eval "$cmd"
  322. html_mono_size=`calcsize $PACKAGE.html`
  323. gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz"
  324. html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"`
  325. copy_images "$outdir/" $PACKAGE.html
  326. mv $PACKAGE.html "$outdir/"
  327. ls -l "$outdir/$PACKAGE.html" "$outdir/$PACKAGE.html.gz"
  328. # Before Texinfo 5.0, makeinfo did not accept a --split=HOW option,
  329. # it just always split by node. So if we're splitting by node anyway,
  330. # leave it out.
  331. if test "x$split" = xnode; then
  332. split_arg=
  333. else
  334. split_arg=--split=$split
  335. fi
  336. #
  337. opt="--html -o $PACKAGE.html $split_arg $commonarg $htmlarg"
  338. cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
  339. printf "\nGenerating html by $split... ($cmd)\n"
  340. eval "$cmd"
  341. split_html_dir=$PACKAGE.html
  342. copy_images $split_html_dir/ $split_html_dir/*.html
  343. (
  344. cd $split_html_dir || exit 1
  345. tar -czf "$abs_outdir/$PACKAGE.html_$split.tar.gz" -- *
  346. )
  347. eval \
  348. html_${split}_tgz_size=`calcsize "$outdir/$PACKAGE.html_$split.tar.gz"`
  349. rm -rf "$outdir/html_$split/"
  350. mv $split_html_dir "$outdir/html_$split/"
  351. du -s "$outdir/html_$split/"
  352. ls -l "$outdir/$PACKAGE.html_$split.tar.gz"
  353. else # use texi2html:
  354. opt="--output $PACKAGE.html $commonarg $htmlarg"
  355. cmd="$SETLANG $TEXI2HTML $opt \"$srcfile\""
  356. printf "\nGenerating monolithic html with texi2html... ($cmd)\n"
  357. rm -rf $PACKAGE.html # in case a directory is left over
  358. eval "$cmd"
  359. html_mono_size=`calcsize $PACKAGE.html`
  360. gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz"
  361. html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"`
  362. mv $PACKAGE.html "$outdir/"
  363. html_split node
  364. html_split chapter
  365. html_split section
  366. fi
  367. fi # end html
  368. #
  369. printf "\nMaking .tar.gz for sources...\n"
  370. d=`dirname $srcfile`
  371. (
  372. cd "$d"
  373. srcfiles=`ls -d *.texinfo *.texi *.txi *.eps $source_extra 2>/dev/null` || true
  374. tar czfh "$abs_outdir/$PACKAGE.texi.tar.gz" $srcfiles
  375. ls -l "$abs_outdir/$PACKAGE.texi.tar.gz"
  376. )
  377. texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"`
  378. #
  379. # Do everything again through docbook.
  380. if test -n "$docbook"; then
  381. opt="-o - --docbook $commonarg"
  382. cmd="$SETLANG $MAKEINFO $opt \"$srcfile\" >${srcdir}/$PACKAGE-db.xml"
  383. printf "\nGenerating docbook XML... ($cmd)\n"
  384. eval "$cmd"
  385. docbook_xml_size=`calcsize $PACKAGE-db.xml`
  386. gzip -f -9 -c $PACKAGE-db.xml >"$outdir/$PACKAGE-db.xml.gz"
  387. docbook_xml_gz_size=`calcsize "$outdir/$PACKAGE-db.xml.gz"`
  388. mv $PACKAGE-db.xml "$outdir/"
  389. split_html_db_dir=html_node_db
  390. opt="$commonarg -o $split_html_db_dir"
  391. cmd="$DOCBOOK2HTML $opt \"${outdir}/$PACKAGE-db.xml\""
  392. printf "\nGenerating docbook HTML... ($cmd)\n"
  393. eval "$cmd"
  394. (
  395. cd ${split_html_db_dir} || exit 1
  396. tar -czf "$abs_outdir/${PACKAGE}.html_node_db.tar.gz" -- *.html
  397. )
  398. html_node_db_tgz_size=`calcsize "$outdir/${PACKAGE}.html_node_db.tar.gz"`
  399. rm -f "$outdir"/html_node_db/*.html
  400. mkdir -p "$outdir/html_node_db"
  401. mv ${split_html_db_dir}/*.html "$outdir/html_node_db/"
  402. rmdir ${split_html_db_dir}
  403. cmd="$DOCBOOK2TXT \"${outdir}/$PACKAGE-db.xml\""
  404. printf "\nGenerating docbook ASCII... ($cmd)\n"
  405. eval "$cmd"
  406. docbook_ascii_size=`calcsize $PACKAGE-db.txt`
  407. mv $PACKAGE-db.txt "$outdir/"
  408. cmd="$DOCBOOK2PDF \"${outdir}/$PACKAGE-db.xml\""
  409. printf "\nGenerating docbook PDF... ($cmd)\n"
  410. eval "$cmd"
  411. docbook_pdf_size=`calcsize $PACKAGE-db.pdf`
  412. mv $PACKAGE-db.pdf "$outdir/"
  413. fi
  414. #
  415. printf "\nMaking index.html for $PACKAGE...\n"
  416. if test -z "$use_texi2html"; then
  417. CONDS="/%%IF *HTML_SECTION%%/,/%%ENDIF *HTML_SECTION%%/d;\
  418. /%%IF *HTML_CHAPTER%%/,/%%ENDIF *HTML_CHAPTER%%/d"
  419. else
  420. # should take account of --split here.
  421. CONDS="/%%ENDIF.*%%/d;/%%IF *HTML_SECTION%%/d;/%%IF *HTML_CHAPTER%%/d"
  422. fi
  423. curdate=`$SETLANG date '+%B %d, %Y'`
  424. sed \
  425. -e "s!%%TITLE%%!$MANUAL_TITLE!g" \
  426. -e "s!%%EMAIL%%!$EMAIL!g" \
  427. -e "s!%%PACKAGE%%!$PACKAGE!g" \
  428. -e "s!%%DATE%%!$curdate!g" \
  429. -e "s!%%HTML_MONO_SIZE%%!$html_mono_size!g" \
  430. -e "s!%%HTML_MONO_GZ_SIZE%%!$html_mono_gz_size!g" \
  431. -e "s!%%HTML_NODE_TGZ_SIZE%%!$html_node_tgz_size!g" \
  432. -e "s!%%HTML_SECTION_TGZ_SIZE%%!$html_section_tgz_size!g" \
  433. -e "s!%%HTML_CHAPTER_TGZ_SIZE%%!$html_chapter_tgz_size!g" \
  434. -e "s!%%INFO_TGZ_SIZE%%!$info_tgz_size!g" \
  435. -e "s!%%DVI_GZ_SIZE%%!$dvi_gz_size!g" \
  436. -e "s!%%PDF_SIZE%%!$pdf_size!g" \
  437. -e "s!%%ASCII_SIZE%%!$ascii_size!g" \
  438. -e "s!%%ASCII_GZ_SIZE%%!$ascii_gz_size!g" \
  439. -e "s!%%TEXI_TGZ_SIZE%%!$texi_tgz_size!g" \
  440. -e "s!%%DOCBOOK_HTML_NODE_TGZ_SIZE%%!$html_node_db_tgz_size!g" \
  441. -e "s!%%DOCBOOK_ASCII_SIZE%%!$docbook_ascii_size!g" \
  442. -e "s!%%DOCBOOK_PDF_SIZE%%!$docbook_pdf_size!g" \
  443. -e "s!%%DOCBOOK_XML_SIZE%%!$docbook_xml_size!g" \
  444. -e "s!%%DOCBOOK_XML_GZ_SIZE%%!$docbook_xml_gz_size!g" \
  445. -e "s,%%SCRIPTURL%%,$scripturl,g" \
  446. -e "s!%%SCRIPTNAME%%!$prog!g" \
  447. -e "$CONDS" \
  448. $GENDOCS_TEMPLATE_DIR/gendocs_template >"$outdir/index.html"
  449. echo "Done, see $outdir/ subdirectory for new files."
  450. # Local variables:
  451. # eval: (add-hook 'before-save-hook 'time-stamp)
  452. # time-stamp-start: "scriptversion="
  453. # time-stamp-format: "%:y-%02m-%02d.%02H"
  454. # time-stamp-end: "$"
  455. # End: