From: Han-Wen Nienhuys Date: Sat, 6 Nov 2004 00:18:04 +0000 (+0000) Subject: (ly:system): add > /dev/null 2>&1 X-Git-Tag: release/2.4.2~3^2~8 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5aebfda08c5434faa6ea3dcbdd10cc87879e7964;p=lilypond.git (ly:system): add > /dev/null 2>&1 --- diff --git a/ChangeLog b/ChangeLog index fed04798ed..f11faf1974 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2004-11-06 Han-Wen Nienhuys + * scm/lily.scm (ly:system): add > /dev/null 2>&1 + * lily/recording-group-engraver.cc (derived_mark): mark now_events_. (backportme) diff --git a/THANKS b/THANKS index a8fed5da0b..b748ab65d2 100644 --- a/THANKS +++ b/THANKS @@ -19,7 +19,7 @@ Heikki Junes BUG HUNTERS/SUGGESTIONS Fernando Pablo Lopez-Lezcano - +Jack O'Quin Release 2.4 *********** diff --git a/mf/GNUmakefile b/mf/GNUmakefile index 914f20830a..802c03f6b7 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -125,7 +125,6 @@ get-deb-pfa: $(outdir)/$(debian-package) rm -rf $(outdir)/./usr ar p $< data.tar.gz | \ tar -C $(outdir) -zvxf - '*.pfa' - touch $(addprefix $(outdir)/, $(addsuffix .bla,$(SAUTER_FONTS))) cp `find $(outdir)/usr/ -name '*.pfa'` $(outdir)/ @@ -136,7 +135,6 @@ $(outdir)/$(redhat-package): get-rpm-pfa: $(outdir)/$(redhat-package) cd $(outdir) ; rm -rf usr/ # (root alert!) cd $(outdir) ; rpm2cpio $(redhat-package) | cpio -uid '*.pfa' - touch $(addprefix $(outdir)/, $(addsuffix .bla,$(SAUTER_FONTS))) cp `find $(outdir)/usr/ -name '*.pfa'` $(outdir)/ # change this dependency diff --git a/scm/framework-tex.scm b/scm/framework-tex.scm index f068fff9d5..11083657aa 100644 --- a/scm/framework-tex.scm +++ b/scm/framework-tex.scm @@ -270,6 +270,11 @@ (ly:get-option 'resolution)) (string-append (basename name ".tex") ".ps")))) + +;; +;; ugh - double check this. We are leaking +;; untrusted (user-settable) info to a command-line +;; (define-public (convert-to-ps book name) (let* ((paper (ly:paper-book-paper book)) (preview? (string-contains name ".preview")) @@ -286,15 +291,9 @@ " -u+ec-mftrace.map -u+lilypond.map -Ppdf " base - (if (ly:get-option 'verbose) - " " - " 2>&1 1>& /dev/null ")))) + ))) - (if (ly:get-option 'verbose) - (begin - (newline (current-error-port)) - (format (current-error-port) (_ "Invoking ~S") cmd) - (newline (current-error-port))) + (if (not (ly:get-option 'verbose)) (begin (format (current-error-port) (_ "Converting to `~a.ps'...") base) (newline (current-error-port)))) @@ -310,15 +309,9 @@ (base (basename name ".tex")) (cmd (string-append "latex \\\\nonstopmode \\\\input " name - (if (ly:get-option 'verbose) - " " - " 2>&1 1>& /dev/null ")))) + ))) (setenv "extra_mem_top" (number->string (max curr-extra-mem 1024000))) - (if (ly:get-option 'verbose) - (begin - (newline (current-error-port)) - (format (current-error-port) (_ "Invoking ~S") cmd) - (newline (current-error-port))) + (if (not (ly:get-option 'verbose)) (begin (format (current-error-port) (_ "Converting to `~a.dvi'...") base) (newline (current-error-port)))) diff --git a/scm/lily.scm b/scm/lily.scm index 82bbfaa384..a8117bd18a 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -563,14 +563,26 @@ possibly turned off." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define-public (ly:system command) - (let* ((status 0)) + (let* + ((status 0) + + (silenced + (string-append command (if (ly:get-option 'verbose) + "" + " > /dev/null 2>&1 ")))) + (if (ly:get-option 'verbose) (format (current-error-port) (_ "Invoking `~a'...\n") command)) - (set! status (system command)) + + (set! status (system silenced)) (if (> status 0) (format (current-error-port) (_ "Error invoking `~a'. Return value ~a") - command status)))) + silenced status)))) +;; +;; ugh - double check this. We are leaking +;; untrusted (user-settable) info to a command-line +;; (define-public (postscript->pdf papersizename name) (let* ((cmd (string-append "ps2pdf -sPAPERSIZE=" papersizename " " name)) (output-name @@ -578,6 +590,7 @@ possibly turned off." (format (current-error-port) (_ "Converting to `~a'...") output-name) (ly:system cmd))) + (define-public (postscript->png resolution name) (let ((cmd (string-append