]> git.donarmstrong.com Git - lilypond.git/commitdiff
Update makelsr script.
authorGraham Percival <graham@percival-music.ca>
Tue, 23 Jan 2007 20:13:23 +0000 (12:13 -0800)
committerGraham Percival <graham@percival-music.ca>
Tue, 23 Jan 2007 20:13:23 +0000 (12:13 -0800)
buildscripts/makelsr.py

index 4a89282953e495e6e07cb19f671a626928253085..3f708272992adb3ee2dafc7e11763a21c1e28b7d 100755 (executable)
@@ -10,16 +10,20 @@ try:
        in_dir = sys.argv[1]
 except:
        print "Please specify input_file."
-       exit
+       sys.exit()
 
 for dir in dirs:
        srcdir = os.path.join (in_dir, dir)
-       destdir = os.path.join (os.getcwd(), 'lsr', dir)
+       destdir = os.path.join ('input', 'lsr', dir)
+       if not(os.path.isdir(destdir)):
+               print "Please run this script from the head of the source tree,"
+               print "  and/or check that you have the right categories."
+               sys.exit()
 
        file_names = os.listdir (destdir)
        for file in file_names:
                if (file.endswith ('.ly')):
-                       if (file[:3] != 'AAA'):   # or whatever we use to denote the first file
+                       if (file[:3] != 'AAA'):
                                os.remove( os.path.join(destdir,file) )
 
        file_names = os.listdir (in_dir + dir)