From 3618a5865c64ece5f9bd95a34a147b6c2657e296 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 19 Jul 2022 01:58:57 +0000 Subject: fmtutil: add cmdline to format build log files git-svn-id: svn://tug.org/texlive/trunk@63934 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/texlive/fmtutil.pl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Master/texmf-dist/scripts/texlive') diff --git a/Master/texmf-dist/scripts/texlive/fmtutil.pl b/Master/texmf-dist/scripts/texlive/fmtutil.pl index a32ada7fc2b..db6a559fa38 100755 --- a/Master/texmf-dist/scripts/texlive/fmtutil.pl +++ b/Master/texmf-dist/scripts/texlive/fmtutil.pl @@ -808,6 +808,13 @@ sub rebuild_one_format { if ($opts{"dry-run"}) { print_info("would copy log file to: $destdir/$logfile\n"); } else { + # Add the actual invocation to the end of the log file + if (open(my $fd, ">>", $logfile)) { + print $fd "# actual command line used during this run\n# $cmdline\n"; + close($fd); + } else { + print_deferred_error("cannot append cmdline to log file"); + } # Here and in the following we use copy instead of move # to make sure that in SElinux enabled cases the rules of # the destination directory are applied. -- cgit v1.2.3