3 # Build html versions of sections of lilypond documentation
5 # Usage: doc-section.sh MANUAL SECTION
7 # where MANUAL is the manual and SECTION is the section to be built.
9 # For example, NR 1.2 would be built by
10 # doc-section.sh notation rhythms
12 # and LM 1 would be built by
13 # doc-section.sh learning tutorial
15 # At the end of the run, the user is prompted whether or not to remove files
17 # Before first use, the following must be done:
18 # * Set FROMDIR, DOCDIR, TODIR, LILYPONDBOOK, and TEXI2HTML for your system
20 # * Copy version.itexi from somewhere in your Documentation tree
21 # (probably Documentation/out) to $DOCDIR
25 # * Doesn't use website css files
26 # * Bitmap images aren't loaded properly
27 # * Won't build Contributors' Guide; see scripts/auxiliar/cg-section.sh
31 # Customize the file here
33 FROMDIR
="$HOME/lilypond"
34 DOCDIR
="$HOME/lilypond/tempdocs"
36 LILYPONDBOOK
="lilypond-book"
38 REFCHECK
="$FROMDIR/scripts/auxiliar/ref_check.py"
43 if test ! -d $TODIR; then
46 if test ! -d $TODIR/out
; then
50 cp $FROMDIR/Documentation
/common-macros.itexi
$TODIR/common-macros.itexi
51 cp $FROMDIR/Documentation
/macros.itexi
$DOCDIR/macros.itexi
52 cp $DOCDIR/version.itexi
$TODIR/version.itexi
54 if test -e $TODIR/$NAME.html
; then
58 if test -e $TODIR/out
/$NAME.texi
; then
59 rm $TODIR/out
/$NAME.texi
62 echo "Running lilypond-book"
65 -I $FROMDIR/Documentation
/snippets \
66 -I $FROMDIR/Documentation
/snippets
/new \
67 -I $FROMDIR/input
/manual \
68 -I $FROMDIR/Documentation \
69 -I $FROMDIR/Documentation
/included \
71 $FROMDIR/Documentation
/$DIRECTORY/$NAME.itely
73 if [ $BOOKRC != 0 ]; then
74 echo "Lilypond-book returned code $BOOKRC"
82 if test -f $TODIR/out
/$NAME.texi
; then
83 echo Running texi2html
84 cat $DOCDIR/macros.itexi
$TODIR/out
/$NAME.texi
> $TODIR/$NAME.texi
87 --output=$TODIR/out
/$NAME.html \
92 read -p "delete files? (y/n): "
93 if [ "$REPLY" = "y" ]; then