summaryrefslogtreecommitdiff
path: root/Master/install-tl.pl
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-01-11 15:12:46 +0000
committerNorbert Preining <preining@logic.at>2008-01-11 15:12:46 +0000
commit7aeba68cd4e684f82458508e7550624cc53a0839 (patch)
treeace28ea72ccb84b10a9f9386eaab8cdba7779877 /Master/install-tl.pl
parenta8c00bcb0cac867976de8b41eefb31b06a9764ae (diff)
dump vars and profile to log file
git-svn-id: svn://tug.org/texlive/trunk@6194 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl.pl')
-rwxr-xr-xMaster/install-tl.pl51
1 files changed, 34 insertions, 17 deletions
diff --git a/Master/install-tl.pl b/Master/install-tl.pl
index 07c82d3def0..2cf3c60fc68 100755
--- a/Master/install-tl.pl
+++ b/Master/install-tl.pl
@@ -269,6 +269,15 @@ if (!$finished) {
do_installation();
}
+# dump various things to the log file
+if (defined($::LOGFILE)) {
+ print $::LOGFILE "\nDump of vars:\n";
+ foreach my $key (keys %vars) {
+ print $::LOGFILE "$key $vars{$key}\n";
+ }
+ create_profile($::LOGFILE);
+}
+
dump_vars("$system_tmpdir/texlive.vars");
# if we installed from a profile we don't need to write it out
@@ -573,26 +582,34 @@ sub create_profile {
# The file "TLprofile" is created at the beginning of the
# installation process and contains information about the current
# setup. The purpose is to allow non-interactive installations.
- open PROFILE, ">$profilepath";
+ my $fh;
+ if (ref($profilepath)) {
+ $fh = $profilepath;
+ } else {
+ open PROFILE, ">$profilepath";
+ $fh = \*PROFILE;
+ }
my $tim = gmtime(time);
- print PROFILE "# texlive.profile written on $tim UTC\n";
- print PROFILE "# it will NOT be overwritten and reflects only the\n";
- print PROFILE "# installation profile at installation time\n";
- print PROFILE "selected_scheme $vars{selected_scheme}\n";
+ print $fh "# texlive.profile written on $tim UTC\n";
+ print $fh "# it will NOT be overwritten and reflects only the\n";
+ print $fh "# installation profile at installation time\n";
+ print $fh "selected_scheme $vars{selected_scheme}\n";
foreach my $key (keys %vars) {
- print PROFILE "$key $vars{$key}\n"
+ print $fh "$key $vars{$key}\n"
if $key=~/^collection/ and $vars{$key}==1;
- print PROFILE "$key $vars{$key}\n" if $key=~/^option_letter/;
- print PROFILE "$key $vars{$key}\n" if $key=~/^option_doc/;
- print PROFILE "$key $vars{$key}\n" if $key=~/^option_fmt/;
- print PROFILE "$key $vars{$key}\n" if $key=~/^option_src/;
- print PROFILE "$key $vars{$key}\n" if $key=~/^option_symlinks/;
- print PROFILE "$key $vars{$key}\n" if $key=~/^TEXDIR/;
- print PROFILE "$key $vars{$key}\n" if $key=~/^TEXMFSYSVAR/;
- print PROFILE "$key $vars{$key}\n" if $key=~/^TEXMFLOCAL/;
- print PROFILE "$key $vars{$key}\n" if $key=~/^TEXMFHOME/;
- }
- close PROFILE;
+ print $fh "$key $vars{$key}\n" if $key=~/^option_letter/;
+ print $fh "$key $vars{$key}\n" if $key=~/^option_doc/;
+ print $fh "$key $vars{$key}\n" if $key=~/^option_fmt/;
+ print $fh "$key $vars{$key}\n" if $key=~/^option_src/;
+ print $fh "$key $vars{$key}\n" if $key=~/^option_symlinks/;
+ print $fh "$key $vars{$key}\n" if $key=~/^TEXDIR/;
+ print $fh "$key $vars{$key}\n" if $key=~/^TEXMFSYSVAR/;
+ print $fh "$key $vars{$key}\n" if $key=~/^TEXMFLOCAL/;
+ print $fh "$key $vars{$key}\n" if $key=~/^TEXMFHOME/;
+ }
+ if (!ref($profilepath)) {
+ close PROFILE;
+ }
}
sub read_profile {