From 40eb872e6fa4d3d8ae9cd9420ee30f13087f2b60 Mon Sep 17 00:00:00 2001 From: hanwen Date: Fri, 30 Jul 2004 18:17:35 +0000 Subject: [PATCH] (postscript->png): show commands for --verbose. --- ChangeLog | 2 ++ scm/lily.scm | 26 +++++++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 80147522c9..753d6ce074 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2004-07-30 Han-Wen Nienhuys + * scm/lily.scm (postscript->png): show commands for --verbose. + * flower/include/getopt-long.hh: opps. short option should be char, not int. diff --git a/scm/lily.scm b/scm/lily.scm index 532f1a9f9d..a6346dc89a 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -553,18 +553,27 @@ L1 is copied, L2 not. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define-public (postscript->pdf papersize name) + (let* + ((cmd (string-append "ps2pdf -sPAPERSIZE=" papersize + " " + name)) + (output-name (regexp-substitute/global #f "\\.ps" name 'pre ".pdf" 'post))) + + (display (string-append - "Converting to " - (regexp-substitute/global #f "\\.ps" name 'pre ".pdf" 'post) - "\n")) - (system (string-append "ps2pdf -sPAPERSIZE=" papersize - " " - name))) + "Converting to " output-name "\n")) + + (if (ly:get-option 'verbose) + (display (format "Invoking ~S" cmd))) + + (system cmd))) + (define-public (postscript->png resolution name) - (system (string-append + (let + ((cmd (string-append "ps2png --resolution=" (if (number? resolution) (number->string resolution) @@ -573,6 +582,9 @@ L1 is copied, L2 not. "--verbose " " ") name))) + (if (ly:get-option 'verbose) + (display (format "Invoking `~S'\n" cmd))) + (system cmd))) (define-public (lilypond-main files) "Entry point for LilyPond." -- 2.39.5