On Fri, Jun 5, 2009 at 6:12 AM, Graham Percival <gra...@percival-music.ca>wrote:

> On Thu, Jun 04, 2009 at 07:46:10PM -0500, Jonathan Kulp wrote:
> > I read the diff for CG when it came in this morning and the LSR stuff
> > looks good to me. If you want, we could also include the script I wrote
> > for checking all the snippets at once. Carl suggested that it go in the
> > docs somewhere.
>
> Yes, please.  In that new subsection would be great.
>

Graham, here's a patch with the script for running and checking all of the
lsr snippets. Also fixed a typo (Uptating > Updating). BTW there are a bunch
of warnings when I run "make doc":

 ** `Fixing snippets in LilyPond sources' is up for `Updating LSR to a new
version', but has no menu entry for this node
WARNING: Node 'Compiling from source' was NOT found in the map
WARNING: Node 'Downloading source code' was NOT found in the map
WARNING: Node 'Requirements' was NOT found in the map
WARNING: Node 'Requirements' was NOT found in the map
WARNING: Node 'Requirements' was NOT found in the map
WARNING: Node 'Requirements' was NOT found in the map
WARNING: Node 'Building LilyPond' was NOT found in the map
WARNING: Node 'Building LilyPond' was NOT found in the map
WARNING: Node 'Building LilyPond' was NOT found in the map
WARNING: Node 'Building LilyPond' was NOT found in the map
WARNING: Node 'Building LilyPond' was NOT found in the map
WARNING: Node 'Building documentation' was NOT found in the map
WARNING: Node 'Commands for building documentation' was NOT found in the map
WARNING: Node 'Building documentation without compiling LilyPond' was NOT
found in the map
WARNING: Node 'Testing LilyPond' was NOT found in the map
WARNING: Node 'Problems' was NOT found in the map
WARNING: Node 'Problems' was NOT found in the map
WARNING: Node 'Problems' was NOT found in the map
WARNING: Node 'Problems' was NOT found in the map
WARNING: Node 'Problems' was NOT found in the map
cp /home/jon/lilypond/Documentation/lilypond*.css out-www/contrib-guide/
texi2html -I /home/jon/lilypond/Documentation/user
--I=/home/jon/lilypond/out/xref-maps  --I=. --I=./out-www -D bigpage
--output=out-www/contrib-guide-big-page.html
--init-file=/home/jon/lilypond/lilypond-texi2html.init
out-www/contrib-guide.texi
** `Fixing snippets in LilyPond sources' is up for `Updating LSR to a new
version', but has no menu entry for this node


The pdf output seems to be o.k. but the warnings aren't normal.

Jon

-- 
Jonathan Kulp
http://www.jonathankulp.com
From 506869c397825df0f2a6a16df6135b01d7f250e9 Mon Sep 17 00:00:00 2001
From: Jonathan Kulp <j...@bashtop.(none)>
Date: Sat, 6 Jun 2009 14:49:24 -0500
Subject: [PATCH] CG: add script for testing LSR snippets

---
 Documentation/devel/lsr-work.itexi |   30 ++++++++++++++++++++++++++++--
 1 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/Documentation/devel/lsr-work.itexi b/Documentation/devel/lsr-work.itexi
index 033cc98..083ee64 100644
--- a/Documentation/devel/lsr-work.itexi
+++ b/Documentation/devel/lsr-work.itexi
@@ -200,7 +200,7 @@ In any case, commit all changes to Git.
 
 
 @node Updating LSR to a new version
-...@subsection Uptating LSR to a new version
+...@subsection Updating LSR to a new version
 
 To update LSR,
 
@@ -208,7 +208,8 @@ To update LSR,
 
 @item
 Download the latest snippet tarball, extract it, and run
-convert-ly on all files.
+convert-ly on all files. To ease the process, you may use the
+shell script that appears after this list.
 
 @item
 Copy relevant snippets (i.e. snippets whose version is equal to or
@@ -239,3 +240,28 @@ included, then delete those snippets from @file{input/new/}.
 @end enumerate
 
 
+Here is a shell script to run all @code{.ly} files in a directory
+and redirect terminal output to text files, which are then
+searched for the word "failed" to see which snippets do not compile.
+
+...@example
+#!/bin/bash
+
+# Mac or Linux?
+OS=$(uname)
+
+# set Lilypond PATH if OS is Darwin
+if [ "$OS" == "Darwin" ] ; then
+   export PATH="$PATH:/Applications/LilyPond.app/Contents/Resources/bin/"
+fi
+
+for LILYFILE in *.ly
+do
+  STEM=$(basename "$LILYFILE" .ly)
+  echo "running $LILYFILE..."
+  lilypond --format=png "$LILYFILE" >& "$STEM".txt
+  rm "$STEM".ps
+done
+
+grep failed *.txt
+...@end example
-- 
1.6.0.4

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to