]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/build/bib2texi.py
Imported Upstream version 2.16.2
[lilypond.git] / scripts / build / bib2texi.py
index c71976dec123f64b50457d055ffa45dd6f5aa14a..b76a171a09263bd64c9ba1970a1b0439845aa3ac 100644 (file)
@@ -6,7 +6,7 @@ import tempfile
 
 # usage:
 def usage ():
-    print 'usage: %s [-s style] [-o <outfile>] [-q] BIBFILES...'
+    print 'usage: bib2texi.py [-s style] [-o <outfile>] [-q] BIBFILES...'
     print '-q suppresses most output'
 
 (options, files) = getopt.getopt (sys.argv[1:], 's:o:hq', [])
@@ -32,6 +32,11 @@ if not files:
    usage ()
    sys.exit (2)
 
+marker = """@c This file was autogenerated
+@c     from: %s
+@c     by:   %s
+
+""" % (", ".join(files), sys.argv[0])
 
 def strip_extension (f, ext):
     (p, e) = os.path.splitext (f)
@@ -84,7 +89,10 @@ if bbl.strip () == '':
     sys.stderr.write ("Bibtex generated an empty file!")
     sys.exit (1)
 
-open (output, 'w').write  (bbl)
+fout = open (output, 'w')
+fout.write (marker)
+fout.write (bbl)
+fout.close ()
 
 def cleanup (tmpfile):
     for a in ['aux','bbl', 'blg']: