]> git.donarmstrong.com Git - lilypond.git/commitdiff
(postscript->png): show commands for --verbose.
authorhanwen <hanwen>
Fri, 30 Jul 2004 18:17:35 +0000 (18:17 +0000)
committerhanwen <hanwen>
Fri, 30 Jul 2004 18:17:35 +0000 (18:17 +0000)
ChangeLog
scm/lily.scm

index 80147522c92fd9c7417e5c688e637472b2f5f73a..753d6ce0745ebe1a6195cb29a3c0d1d08b69b592 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2004-07-30  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * scm/lily.scm (postscript->png): show commands for --verbose.
+
        * flower/include/getopt-long.hh: opps. short option should be
        char, not int.
 
index 532f1a9f9db8de336a1bfb621f42d3c60b8d0dd5..a6346dc89ab4b9137bd0c5b365369fa011fc8f9a 100644 (file)
@@ -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."