diff options
author | Norbert Preining <preining@logic.at> | 2010-02-08 02:13:20 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2010-02-08 02:13:20 +0000 |
commit | 4540c7b2f53eade707e96953e43da0de0031ee0a (patch) | |
tree | 8b9a7491b5239ef2158b8cc7d622814fd93825a4 /Master/install-tl | |
parent | c696c0b55292d27785e4315b642e138c5aeaad3e (diff) |
make installer hide the "Setup for running from DVD" if this mode
is not available
git-svn-id: svn://tug.org/texlive/trunk@16939 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-x | Master/install-tl | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Master/install-tl b/Master/install-tl index d3d8a1c6522..14c484f539c 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -296,6 +296,7 @@ my $finished = 0; my $system_tmpdir=get_system_tmpdir(); my $media; +our @media_available; # special uses of install-tl: if ($opt_print_arch) { @@ -379,6 +380,7 @@ if ($location =~ m!^(ctan$|(http|ftp)://)!i) { } $TeXLiveURL = $location; $media = 'NET'; + @media_available = qw/NET/; } else { # remove leading file:/+ part $location =~ s!^file://*!/!i; @@ -386,9 +388,17 @@ if ($location =~ m!^(ctan$|(http|ftp)://)!i) { # remove trailing \ or / (e.g. root of dvd drive on w32) $location =~ s,[\\\/]$,,; if (-d "$location/$Archive") { - $media='CD'; - } elsif (-d "$location/texmf/web2c") { - $media='DVD'; + push @media_available, 'CD'; + } + + if (-d "$location/texmf/web2c") { + push @media_available, 'DVD'; + } + + if (member('CD', @media_available)) { + $media = 'CD'; + } elsif (member('DVD', @media_available)) { + $media = 'DVD'; } else { if ($opt_location) { # user gave a --location but nothing can be found there, so die |