X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fbackend-library.scm;h=3a4ccab817871d821b3e6641e1b0e4d044191e2f;hb=f2bb61843cdd3e049945c4b56b80089eefb3f7a4;hp=9fa094f51892e3eb0e0cad2186c1922ba97bf0b3;hpb=eb4d92fc2b3eaa7cae8a08b311fa0139f0b2d7b1;p=lilypond.git diff --git a/scm/backend-library.scm b/scm/backend-library.scm index 9fa094f518..3a4ccab817 100644 --- a/scm/backend-library.scm +++ b/scm/backend-library.scm @@ -140,15 +140,15 @@ (define-public (postprocess-output paper-book module filename formats) (let* ((completed (completize-formats formats)) - (base (string-regexp-substitute "\\.[a-z]+$" "" filename)) + (base (dir-basename filename ".ps" ".eps")) (intermediate (remove (lambda (x) (member x formats)) completed))) - (for-each (lambda (f) ((eval (string->symbol (format "convert-to-~a" f)) module) paper-book filename)) completed) (if (ly:get-option 'delete-intermediate-files) (for-each (lambda (f) - (delete-file (string-append base "." f))) intermediate)))) + (if (file-exists? f) (delete-file f))) + (map (lambda (x) (string-append base "." x)) intermediate))))) (define-public (completize-formats formats) (define new-fmts '())