diff options
author | Norbert Preining <preining@logic.at> | 2008-01-17 15:09:57 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-01-17 15:09:57 +0000 |
commit | 9273ad7967dfe27112f253ab3e101d20c8766334 (patch) | |
tree | 2c37f804581fdc512eada29669f89e107b0acbe2 /Master/install-tl.pl | |
parent | 2284e22873d712b9554e14818ae373be0f3fe6cf (diff) |
flushlog tries to write out the log file to ., and only if that doesn't
work it flushes it to stdout
git-svn-id: svn://tug.org/texlive/trunk@6291 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl.pl')
-rwxr-xr-x | Master/install-tl.pl | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Master/install-tl.pl b/Master/install-tl.pl index 32a15b68d15..41a5acc6db3 100755 --- a/Master/install-tl.pl +++ b/Master/install-tl.pl @@ -887,9 +887,17 @@ sub update_numbers { } sub flushlog { - print STDERR "Not creating a log file but flushing messages to stderr:\n"; + my $fh; + if (open(LOG,">install-tl.log")) { + warn STDERR "Writing log file to current working directory!\n"; + $fh = \*LOG; + } else { + $fh = \*STDERR; + warn STDERR "Not creating a log file but flushing messages to stderr:\n"; + } + foreach my $l (@::LOGLINES) { - print STDERR $l; + print $fh $l; } } |