summaryrefslogtreecommitdiff
path: root/Master/install-tl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-xMaster/install-tl102
1 files changed, 92 insertions, 10 deletions
diff --git a/Master/install-tl b/Master/install-tl
index e2f103e9d70..d3d8a1c6522 100755
--- a/Master/install-tl
+++ b/Master/install-tl
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
# $Id$
#
-# Copyright 2007, 2008, 2009 Reinhard Kotucha, Norbert Preining
+# Copyright 2007, 2008, 2009, 2010 Reinhard Kotucha, Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
#
@@ -52,7 +52,7 @@ use TeXLive::TLUtils qw(platform platform_desc
which getenv win32 unix info log debug tlwarn ddebug tldie
get_system_tmpdir member process_logging_options rmtree
mkdirhier make_var_skeleton make_local_skeleton install_package copy
- install_packages dirname setup_programs welcome welcome_paths);
+ install_packages dirname setup_programs);
#use TeXLive::TLMedia;
use TeXLive::TLPOBJ;
use TeXLive::TLPDB;
@@ -90,17 +90,15 @@ if (win32) {
use strict;
-# debugging/logging cmd lines options:
-# -q shut up terminal output but warning messages
-# -v do a bit of debugging to stdout and logfile
-# repeated use increases the value of verbosity
-#
+# global list of lines that get logged (see TLUtils.pm::_logit).
@::LOGLINES = ();
-#
+
+# we play around with the environment, place to keep original
+my %origenv = ();
+
# $install{$packagename} == 1 if it should be installed
my %install;
-#
# the different modules have to assign a code blob to this global variable
# which starts the installation.
# Example: In install-menu-text.pl there is
@@ -651,6 +649,7 @@ sub do_postinst_stuff {
# - run the programs
# Step 1: Clean the environment
+ %origenv = %ENV;
my @TMFVARS0=qw(VARTEXFONTS
TEXMF SYSTEXMF VARTEXFONTS
TEXMFDBS WEB2C TEXINPUTS TEXFORMATS MFBASES MPMEMS TEXPOOL MFPOOL MPPOOL
@@ -1627,6 +1626,89 @@ sub do_cleanup
}
+# Return the basic welcome message.
+
+sub welcome
+{
+ my $welcome = <<"EOF";
+
+ See
+ $::vars{'TEXDIR'}/index.html
+ for links to documentation. The TeX Live web site (http://tug.org/texlive/)
+ contains updates and corrections.
+
+ TeX Live is a joint project of the TeX user groups around the world;
+ please consider supporting it by joining the group best for you. The
+ list of groups is available on the web at http://tug.org/usergroups.html.
+
+ Welcome to TeX Live!
+EOF
+ return $welcome;
+}
+
+
+# The same welcome message as above but with hints about C<PATH>,
+# C<MANPATH>, and C<INFOPATH>.
+
+sub welcome_paths
+{
+ my $welcome = welcome ();
+
+ # ugly, remove welcome msg; better than repeating the whole text, though.
+ $welcome =~ s/\n Welcome to TeX Live!\n//;
+
+ $welcome .= <<"EOF";
+
+ Add $::vars{'TEXDIR'}/texmf/doc/man to MANPATH.
+ Add $::vars{'TEXDIR'}/texmf/doc/info to INFOPATH.
+EOF
+
+ if ($::vars{'from_dvd'} and !win32()) {
+ $welcome .= <<"EOF";
+ Set TEXMFCNF to $::vars{'TEXMFSYSVAR'}/web2c.
+EOF
+ }
+
+ $welcome .= <<"EOF";
+
+ Most importantly, add $::vars{'TEXDIR'}/bin/$::vars{'this_platform'}
+ to your PATH for current and future sessions.
+EOF
+
+ # check for tex-related envvars.
+ my $texenvs = "";
+ for my $evar (sort keys %origenv) {
+ next if $evar =~ /^(_
+ |.*PWD
+ |GENDOCS_TEMPLATE_DIR|PATH|SHELLOPTS
+ )$/x; # don't worry about these
+ if ("$evar $origenv{$evar}" =~ /tex/i) { # check both key and value
+ $texenvs .= " $evar=$origenv{$evar}\n";
+ }
+ }
+ if ($texenvs) {
+ $welcome .= <<"EOF";
+
+ ----------------------------------------------------------------------
+ The following environment variables contain the string "tex"
+ (case-independent). If you're doing anything but adding personal
+ directories to the system paths, they may well cause trouble with
+ some parts of running TeX. If you encounter problems, try unsetting
+ them. (And please ignore any spurious matches that are unrelated to TeX.)
+
+$texenvs ----------------------------------------------------------------------
+EOF
+ }
+
+ $welcome .= <<"EOF";
+
+ Welcome to TeX Live!
+EOF
+
+ return $welcome;
+}
+
+
# portable option, invoked from tl-portable script.
#
sub do_portable {
@@ -1674,7 +1756,7 @@ sub do_portable {
}
close($::LOGFILE) if defined($::LOGFILE);
- print TeXLive::TLUtils::welcome;
+ print welcome();
exit 0;