diff options
-rwxr-xr-x | Master/install-tl | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/Master/install-tl b/Master/install-tl index 163f4214bc8..3bf3702335a 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -1208,13 +1208,18 @@ sub do_cleanup { # now open the log file and write out the log lines # try to open a log file - if (open(LOGF,">$vars{'TEXDIRW'}/install-tl.log")) { - $::LOGFILE = \*LOGF; - foreach my $line(@::LOGLINES) { - print $::LOGFILE "$line"; + # the user could have given the -logfile option in which case all the + # stuff is already dumped to it and $::LOGFILE defined. So do not + # redefine it + if (!defined($::LOGFILE)) { + if (open(LOGF,">$vars{'TEXDIRW'}/install-tl.log")) { + $::LOGFILE = \*LOGF; + foreach my $line(@::LOGLINES) { + print $::LOGFILE "$line"; + } + } else { + warn("Cannot create log file $vars{'TEXDIRW'}/install-tl.log: $!\nNot writing out log lines!\n"); } - } else { - warn("Cannot create log file $vars{'TEXDIRW'}/install-tl.log: $!\nNot writing out log lines!\n"); } # remove temporary files from TEXDIR/temp @@ -1340,6 +1345,16 @@ Omit normal informational messages. Include debugging messages; repeat for maximum debugging, as in C<-v -v>. (Further repeats are accepted but ignored.) +=item B<-logfile> I<file> + +Write both all messages (informational, debugging, warnings) to I<file>, +in addition to standard output or standard error. + +If this option is not given, the installer will create a log file +in the root of the writable installation tree, +for example, C</usr/local/texlive/YYYY/install-tl.log> for the I<YYYY> +release. + =item B<--help>, B<-help>, B<-?> Display this help and exit. @@ -1359,9 +1374,6 @@ The TeX Live installer works across all supported platforms and allows to install TeX Live from various media, including the network. See L<http://tug.org/texlive/tlmgr.html> for more. -A log file is written to the root of the writable installation tree, -for example, C</usr/local/texlive/YYYY/install-tl.log> for the I<YYYY> -release. =head1 PORTABLE USE |