]> git.donarmstrong.com Git - lilypond.git/commitdiff
Makelsr: bypass safety check for snippets from input/new
authorJohn Mandereau <john.mandereau@gmail.com>
Thu, 23 Apr 2009 23:57:48 +0000 (01:57 +0200)
committerJohn Mandereau <john.mandereau@gmail.com>
Fri, 24 Apr 2009 08:33:05 +0000 (10:33 +0200)
scripts/auxiliar/makelsr.py

index 4f95e7de77ca3c69ca076c7d82af0adc6c1e229a..97791055bf30569e347a44778a2a90fbeca27923 100755 (executable)
@@ -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
 
 ''')
-