Hi,

I'm having problems with the script to build only one doc section.
I have LilyPond from the Git repository, on branch master, latest fetches.

When running the script I get the following error:

/home/uliska/git/3rd-party-repos/lilypond/Documentation/contributor/administration.itely
 did not exist; is administration a valid section in the contributor manual?

Looking into the script I see that on line 85 SECTION_PATH is suffixed with ".itely". But I see that some files from the documentation are .itely files and some .itexi.

Shouldn't the script find .itely files as well as .itexi files automatically?

The attached patch seems to fix the problem (as far as I can see with my limited experience):

1)
First SECTION_PATH is constructed without extension.
2)
If a file with one of the two extensions is present then that extension is added to SECTION_PATH
3)
If none is present the check will fail (and spit out an updated error message).

I tried this with both an .itexi and an .itely file, and both worked.

I hope this works and can be included into the main source.

Another issue with that script in a separate mail.

Urs
>From 752bfb66303e229287e64b53a747e2c2280db8b2 Mon Sep 17 00:00:00 2001
From: Urs Liska <g...@ursliska.de>
Date: Mon, 15 Apr 2013 15:26:20 +0200
Subject: [PATCH] doc-section.sh: Fix .itexi/.itely issue

The script looked for .itely files hardcoded.
This fix checks for both and sets the filename accordingly
---
 scripts/auxiliar/doc-section.sh |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/scripts/auxiliar/doc-section.sh b/scripts/auxiliar/doc-section.sh
index 9634768..c616b9f 100755
--- a/scripts/auxiliar/doc-section.sh
+++ b/scripts/auxiliar/doc-section.sh
@@ -82,7 +82,7 @@ MANUAL="$1"
 SECTION="$2"
 OUTPUT_DIR="$DOC_DIR/$SECTION"
 MANUAL_PATH="$LILYPOND_GIT/Documentation/$MANUAL"
-SECTION_PATH="$MANUAL_PATH/$SECTION.itely"
+SECTION_PATH="$MANUAL_PATH/$SECTION"
 
 if test ! -d "$LILYPOND_BUILD_DIR"; then
     echo "$LILYPOND_BUILD_DIR did not exist; check your setting of LILYPOND_BUILD_DIR. Aborting." >&2
@@ -94,8 +94,16 @@ if test ! -d "$MANUAL_PATH"; then
     exit 1
 fi
 
+if test -e "$MANUAL_PATH/$SECTION.itexi"; then
+    SECTION_PATH="$MANUAL_PATH/$SECTION.itexi"
+fi
+
+if test -e "$MANUAL_PATH/$SECTION.itely"; then
+    SECTION_PATH="$MANUAL_PATH/$SECTION.itely"
+fi
+
 if test ! -e "$SECTION_PATH"; then
-    echo "$SECTION_PATH did not exist; is $SECTION a valid section in the $MANUAL manual?" >&2
+    echo "$SECTION_PATH.itexi (or .itely) did not exist; is $SECTION a valid section in the $MANUAL manual?" >&2
     exit 1
 fi
 
-- 
1.7.9.5

_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to