From 506869c397825df0f2a6a16df6135b01d7f250e9 Mon Sep 17 00:00:00 2001 From: Jonathan Kulp 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 address@hidden Uptating LSR to a new version address@hidden 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. + address@hidden +#!/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 address@hidden example -- 1.6.0.4