public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Henriksson <andreas@fatal.se>
To: util-linux@vger.kernel.org
Cc: Andreas Henriksson <andreas@fatal.se>
Subject: [PATCH 2/2] script: silence the done message on --quiet as well
Date: Sun, 22 Jun 2014 03:12:44 +0200	[thread overview]
Message-ID: <1403399564-10250-1-git-send-email-andreas@fatal.se> (raw)
In-Reply-To: <1403391784-9912-1-git-send-email-andreas@fatal.se>

Apparently James Hunts patch (which he provided a long time
ago) is no longer covering it all.

This followup patch also silences the "Script done ..." message
when --quiet is used.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
---
 term-utils/script.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/term-utils/script.c b/term-utils/script.c
index 21fb5af..2da7512 100644
--- a/term-utils/script.c
+++ b/term-utils/script.c
@@ -578,7 +578,8 @@ done(void) {
 			char buf[BUFSIZ];
 			tvec = time((time_t *)NULL);
 			my_strftime(buf, sizeof buf, "%c\n", localtime(&tvec));
-			fprintf(fscript, _("\nScript done on %s"), buf);
+			if (!qflg)
+				fprintf(fscript, _("\nScript done on %s"), buf);
 
 			if (close_stream(fscript) != 0)
 				errx(EXIT_FAILURE, _("write error"));
-- 
2.0.0


  reply	other threads:[~2014-06-22  1:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-21 23:03 [PATCH] script: --quiet option is not quiet Andreas Henriksson
2014-06-22  1:12 ` Andreas Henriksson [this message]
2014-06-23  9:42 ` Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1403399564-10250-1-git-send-email-andreas@fatal.se \
    --to=andreas@fatal.se \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox