From 12758e804816a5fbd9430196c4aec1d20cfa313a Mon Sep 17 00:00:00 2001 From: John Mandereau Date: Fri, 24 Apr 2009 01:57:48 +0200 Subject: [PATCH] Makelsr: bypass safety check for snippets from input/new --- scripts/auxiliar/makelsr.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/auxiliar/makelsr.py b/scripts/auxiliar/makelsr.py index 4f95e7de77..97791055bf 100755 --- a/scripts/auxiliar/makelsr.py +++ b/scripts/auxiliar/makelsr.py @@ -101,10 +101,12 @@ def copy_ly (srcdir, name, tags): unconverted.append (dest) if os.path.exists (dest + '~'): os.remove (dest + '~') - # -V seems to make unsafe snippets fail nicer/sooner - e = os.system ("lilypond -V -dno-print-pages -dsafe -o /tmp/lsrtest '%s'" % dest) - if e: - unsafe.append (dest) + # no need to check snippets from input/new + if in_dir and in_dir in srcdir: + # -V seems to make unsafe snippets fail nicer/sooner + e = os.system ("lilypond -V -dno-print-pages -dsafe -o /tmp/lsrtest '%s'" % dest) + if e: + unsafe.append (dest) def read_source_with_dirs (src): s = {} @@ -175,13 +177,12 @@ if unconverted: if notags_files: sys.stderr.write ('No tags could be found in these files:\n') sys.stderr.write ('\n'.join (notags_files) + '\n\n') - -dump_file_list ('lsr-unsafe.txt', unsafe) -sys.stderr.write (''' +if unsafe: + dump_file_list ('lsr-unsafe.txt', unsafe) + sys.stderr.write (''' Unsafe files printed in lsr-unsafe.txt: CHECK MANUALLY! git add input/lsr/*.ly xargs git diff HEAD < lsr-unsafe.txt ''') - -- 2.39.5