]> git.donarmstrong.com Git - lilypond.git/blobdiff - buildscripts/makelsr.py
Oops, actually add new INSTALL file.
[lilypond.git] / buildscripts / makelsr.py
index bc79cf8839035828988f851352d5beb97729872a..ab18da2ace687264a5fd2e9a9b7f1ae16d6467ed 100755 (executable)
@@ -4,7 +4,7 @@ import os
 import os.path
 import shutil
 
-dirs = ['ancient','chords','connecting','contemporary','expressive','guitar','parts','repeats','scheme','spacing','staff','text','vocal']
+dirs = ['ancient','chords','connecting','contemporary','expressive','education','guitar','parts','pitch','repeats','scheme','spacing','staff','text','vocal','other','nonmusic','engravers','instrument']
 notsafe=[]
 
 try:
@@ -19,16 +19,24 @@ def copy_with_warning(src, dest):
 
 
 def copy_dir_with_test(srcdir, destdir):
+       global notsafe
+       global notconvert
        if not(os.path.exists(srcdir)):
                return
        file_names = os.listdir (srcdir)
        for file in file_names:
-               src = os.path.join (srcdir, file)
-               dest = os.path.join (destdir, file)
-               copy_with_warning(src, dest)
-               s = os.system('lilypond -dsafe -dbackend=svg -o /tmp/lsrtest ' + dest)
-               if s:
-                       notsafe.append(dest)
+               if (file.endswith ('.ly')):
+                       src = os.path.join (srcdir, file)
+                       dest = os.path.join (destdir, file)
+                       copy_with_warning(src, dest)
+                       os.system('convert-ly -e ' + dest)
+                       if os.path.exists( dest + '~' ):
+                               os.remove( dest + '~' )
+                       # the -V seems to make unsafe snippets fail nicer/sooner.
+                       s = os.system('nice lilypond -V -dno-print-pages -dsafe -o /tmp/lsrtest ' + dest)
+                       #s = os.system('nice lilypond -dno-print-pages -dsafe -o /tmp/lsrtest ' + dest)
+                       if s:
+                               notsafe.append(dest)
 
 
 for dir in dirs:
@@ -43,23 +51,21 @@ for dir in dirs:
        file_names = os.listdir (destdir)
        for file in file_names:
                if (file.endswith ('.ly')):
-                       if (file[:3] != 'AAA'):
-                               os.remove( os.path.join(destdir,file) )
-
+                       os.remove( os.path.join(destdir,file) )
        ## copy in new files from LSR download
        copy_dir_with_test( srcdir, destdir )
        ## copy in new files in source tree
-       copy_dir_with_test( os.path.join ('input', 'tolsr', dir), destdir )
+       copy_dir_with_test( os.path.join ('input', 'new', dir), destdir )
 
 
 file=open("lsr-unsafe.txt", 'w')
 for s in notsafe:
        file.write(s+'\n')
 file.close()
+
 print
 print
 print "Unsafe files printed in lsr-unsafe.txt: CHECK MANUALLY!"
 print "  xargs git-diff < lsr-unsafe.txt"
 print
 
-