diff options
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-x | Master/install-tl | 50 |
1 files changed, 37 insertions, 13 deletions
diff --git a/Master/install-tl b/Master/install-tl index e4d2740459e..8b70cfa1bf5 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -1,7 +1,7 @@ #!/usr/bin/env perl # $Id$ # -# Copyright 2007-2013 +# Copyright 2007-2014 # Reinhard Kotucha, Norbert Preining, Karl Berry, Siep Kroonenberg. # This file is licensed under the GNU General Public License version 2 # or any later version. @@ -234,13 +234,28 @@ if ($opt_gui eq "expert") { } if ($opt_help) { - if (win32()) { - pod2usage(-exitstatus => 0, -verbose => 2, - -noperldoc => 1, -output => \*STDOUT); + # theoretically we could make a subroutine with all the same + # painful checks as we do in tlmgr, but let's not bother until people ask. + my @noperldoc = (); + if (win32() || $ENV{"NOPERLDOC"}) { + @noperldoc = ("-noperldoc", "1"); + } + + # Tweak less stuff same as tlmgr, though. + # less can break control characters and thus the output of pod2usage + # is broken. We add/set LESS=-R in the environment and unset + # LESSPIPE and LESSOPEN to try to help. + # + if (defined($ENV{'LESS'})) { + $ENV{'LESS'} .= " -R"; } else { - pod2usage(-exitstatus => 0, -verbose => 2, -file => $0); + $ENV{'LESS'} = "-R"; } - die "sorry, pod2usage failure, maybe download failure?"; + delete $ENV{'LESSPIPE'}; + delete $ENV{'LESSOPEN'}; + + pod2usage(-exitstatus => 0, -verbose => 2, @noperldoc); + die "sorry, pod2usage did not work; maybe a download failure?"; } if ($opt_version) { @@ -265,14 +280,14 @@ if ($opt_version) { exit 0; } -die "Options custom-bin and in-place are incompatible." - if ($opt_in_place and $opt_custom_bin); +die "$0: Options custom-bin and in-place are incompatible.\n" + if ($opt_in_place && $opt_custom_bin); -die "Options profile and in-place are incompatible." - if ($opt_in_place and $opt_profile); +die "$0: Options profile and in-place are incompatible.\n" + if ($opt_in_place && $opt_profile); -die "Options profile-seed and in-place are incompatible." - if ($opt_in_place and $opt_profileseed); +die "$0: Options profile-seed and in-place are incompatible.\n" + if ($opt_in_place && $opt_profileseed); if ($#ARGV >= 0) { # we still have arguments left, should only be gui, otherwise die @@ -2216,7 +2231,12 @@ runnable, or installation will fail. C<-force-arch> is a synonym. =item B<-help>, B<--help>, B<-?> -Display this help and exit. +Display this help and exit (on the web via +L<http://tug.org/texlive/doc/install-tl.html>). Sometimes the +C<perldoc> and/or C<PAGER> programs on the system have problems, +possibly resulting in control characters being literally output. This +can't always be detected, but you can set the C<NOPERLDOC> environment +variable and C<perldoc> will not be used. =item B<-in-place> @@ -2361,6 +2381,10 @@ Omit creating the ConTeXt cache. This is useful for redistributors. Specify the respective directories. +=item C<NOPERLDOC> + +Don't try to run the C<--help> message through C<perldoc>. + =back |