]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
script: silence the done message on --quiet as well
authorAndreas Henriksson <andreas@fatal.se>
Sun, 22 Jun 2014 01:12:44 +0000 (03:12 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 23 Jun 2014 09:31:08 +0000 (11:31 +0200)
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

index 21fb5af9ec86d2e275733e65a492f4ccf0bff585..2da75124bbacc451cc6d37c74fe46ae8b217ff81 100644 (file)
@@ -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"));