gendocs.sh 17 KB

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