]> git.donarmstrong.com Git - lilypond.git/commitdiff
Try to use base name of regtests file names
authorJohn Mandereau <john.mandereau@gmail.com>
Mon, 25 Feb 2008 13:34:26 +0000 (14:34 +0100)
committerJohn Mandereau <john.mandereau@gmail.com>
Mon, 25 Feb 2008 13:34:26 +0000 (14:34 +0100)
buildscripts/lys-to-tely.py

index c026522434e37b77a453592aaca71487c2e5b1b3..236aacb920130babef18b9ac09d0ad2c38b0ca37 100644 (file)
@@ -80,6 +80,14 @@ for opt in options:
     else:
         raise Exception ('unknown option: ' + o)
 
+def shorten_file_name (n):
+    # ugh, regtests file names appear as full paths in GUB builds
+    # we try to do something here
+    b = os.path.basename (n)
+    if os path.exists (b):
+        return b
+    return n
+
 def name2line (n):
     # UGR
     s = r"""
@@ -98,6 +106,7 @@ if files:
     name = os.path.basename (name)
     template = template % vars ()
 
+    files = map (shorten_file_name, files)
     files.sort ()
     s = "\n".join (map (name2line, files))
     s = template.replace (include_snippets, s, 1)