summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2010-02-08 02:13:20 +0000
committerNorbert Preining <preining@logic.at>2010-02-08 02:13:20 +0000
commit4540c7b2f53eade707e96953e43da0de0031ee0a (patch)
tree8b9a7491b5239ef2158b8cc7d622814fd93825a4
parentc696c0b55292d27785e4315b642e138c5aeaad3e (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
-rwxr-xr-xMaster/install-tl16
-rwxr-xr-xMaster/tlpkg/installer/install-menu-text.pl12
2 files changed, 21 insertions, 7 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
diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl
index 7bbbf5175c0..c37d392d950 100755
--- a/Master/tlpkg/installer/install-menu-text.pl
+++ b/Master/tlpkg/installer/install-menu-text.pl
@@ -13,6 +13,7 @@ use vars qw(@::end_install_hook $::opt_no_cls);
our %vars;
our $tlpdb;
+our @media_available;
our $previoustlpdb;
our @collections_std;
our @collections_lang;
@@ -864,6 +865,7 @@ sub do_install {
}
sub dvd_hd_toggle {
+ return if !member('DVD', @media_available);
if ($vars{'from_dvd'}) { # set up for hd install:
$vars{'from_dvd'} = 0;
$vars{'TEXDIR'} = $vars{'TEXDIRW'};
@@ -1006,10 +1008,12 @@ EOF
}
}
- if ($vars{'from_dvd'}) {
- print "\n <V> set up for installing to hard disk\n";
- } else {
- print "\n <V> set up for running from DVD\n";
+ if (member('DVD', @media_available)) {
+ if ($vars{'from_dvd'}) {
+ print "\n <V> set up for installing to hard disk\n";
+ } else {
+ print "\n <V> set up for running from DVD\n";
+ }
}
other_options qw(I H Q);