From d51f8ec129a74d40a0651f7374f2755d0024e361 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 2 Oct 2019 14:22:12 +0200 Subject: [PATCH] scriptreplay: make data log file optional for --summary Signed-off-by: Karel Zak --- term-utils/script.1 | 6 +++++- term-utils/scriptreplay.c | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/term-utils/script.1 b/term-utils/script.1 index 158a9ffa9a..b73420267b 100644 --- a/term-utils/script.1 +++ b/term-utils/script.1 @@ -50,7 +50,11 @@ and to store additional information about the session. Since version 2.35 .B script supports multiple streams and allows to log input and output to separate -files or all the one file. +files or all the one file. This version also supports new timing file +which records additional information. The command +.B scriptreplay \-\-summary +then provides all the information. + .PP If the argument .I file diff --git a/term-utils/scriptreplay.c b/term-utils/scriptreplay.c index 81906946e4..609b20f93e 100644 --- a/term-utils/scriptreplay.c +++ b/term-utils/scriptreplay.c @@ -243,7 +243,7 @@ main(int argc, char *argv[]) if (!log_tm && idx < argc) log_tm = argv[idx++]; - if (!log_out && !log_in && !log_io) + if (!log_out && !summary && !log_in && !log_io) log_out = idx < argc ? argv[idx++] : "typescript"; if (!diviopt) @@ -251,7 +251,7 @@ main(int argc, char *argv[]) if (!log_tm) errx(EXIT_FAILURE, _("timing file not specified")); - if (!(log_out || log_in || log_io)) + if (!(log_out || log_in || log_io) && !summary) errx(EXIT_FAILURE, _("data log file not specified")); setup = replay_new_setup(); -- 2.39.2