diff options
author | Karl Berry <karl@freefriends.org> | 2008-08-07 18:42:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-08-07 18:42:22 +0000 |
commit | adb0a7ac7de51e58e1dad96538b93700f204e6e9 (patch) | |
tree | 7bf77fddda2f30b709d39909e80084a5b371fd34 /Master/tlpkg/installer | |
parent | 2a90df6e44d5066f1cc6db534ce9d54d7ed52c0d (diff) |
complain if input command has no definition.
git-svn-id: svn://tug.org/texlive/trunk@10147 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/installer')
-rwxr-xr-x | Master/tlpkg/installer/install-menu-text.pl | 64 |
1 files changed, 39 insertions, 25 deletions
diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl index 58cc88130f2..665ebec3535 100755 --- a/Master/tlpkg/installer/install-menu-text.pl +++ b/Master/tlpkg/installer/install-menu-text.pl @@ -156,6 +156,8 @@ sub binary_menu { } if (defined $keyval{$keystroke}) { toggle "$keyval{$keystroke}"; + } else { + print "Unknown command: $keystroke\n\n"; } } if ($vars{"binary_win32"}) { @@ -232,6 +234,7 @@ sub scheme_menu { if (defined $command{"\u$answer"}) { return $command{"\u$answer"}->(); } else { + print "Unknown command: $answer\n\n"; return $command{'self'}->(); } } @@ -322,6 +325,7 @@ sub collection_menu { if (defined $command{"\u$answer"}) { return $command{"\u$answer"}->(); } else { + print "Unknown command: $answer\n\n"; return $command{'self'}->(); } } @@ -415,6 +419,7 @@ sub language_menu { if (defined $command{"\u$answer"}) { return $command{"\u$answer"}->(); } else { + print "Unknown command: $answer\n\n"; return $command{'self'}->(); } } @@ -464,7 +469,7 @@ EOF } other_options qw (R Q); - my $answer=prompt 'Enter command'; + my $answer = prompt 'Enter command'; my $home = getenv('HOME'); $home = getenv('USERPROFILE') if (win32); @@ -488,37 +493,40 @@ EOF $vars{'TEXDIRW'} = $vars{'TEXDIR'} unless $vars{'from_dvd'}; return $command{'self'}; } - } - if ("\u$answer" eq '2') { + + } elsif ("\u$answer" eq '2') { print "New value TEXMFLOCAL [$vars{'TEXMFLOCAL'}]: "; chomp($answer=<STDIN>); $vars{'TEXMFLOCAL'}="$answer" if (length $answer); $vars{'TEXMFLOCAL'}=~s@\\@/@g if (win32); $vars{'TEXMFLOCAL'} =~ s/^~/$home/; return $command{'self'}; - } - if ("\u$answer" eq '3') { + + } elsif ("\u$answer" eq '3') { print "New value TEXMFSYSVAR [$vars{'TEXMFSYSVAR'}]: "; chomp($answer=<STDIN>); $vars{'TEXMFSYSVAR'}="$answer" if (length $answer); $vars{'TEXMFSYSVAR'}=~s@\\@/@g if (win32); $vars{'TEXMFSYSVAR'} =~ s/^~/$home/; return $command{'self'}; - } - if ("\u$answer" eq '4') { + + } elsif ("\u$answer" eq '4') { print "New value TEXMFSYSCONFIG [$vars{'TEXMFSYSCONFIG'}]: "; chomp($answer=<STDIN>); $vars{'TEXMFSYSCONFIG'}="$answer" if (length $answer); $vars{'TEXMFSYSCONFIG'}=~s@\\@/@g if (win32); $vars{'TEXMFSYSCONFIG'} =~ s/^~/$home/; return $command{'self'}; - } - if ("\u$answer" eq '5') { + + } elsif ("\u$answer" eq '5') { print "New value TEXMFHOME [$vars{'TEXMFHOME'}]: "; chomp($answer=<STDIN>); $vars{'TEXMFHOME'}="$answer" if (length $answer); $vars{'TEXMFHOME'}=~s@\\@/@g if (win32); return $command{'self'}; + + } else { + print "Unknown command: $answer\n\n"; } if (defined $command{"\u$answer"}) { @@ -623,23 +631,25 @@ sub help_menu { " <T> top <N> next page <P> previous page <R> return" . " --", $vars{'page'}+1, "--\n"; - my $answer=prompt 'Enter command'; + my $answer = prompt 'Enter command'; if ("\u$answer" eq 'T') { $vars{'page'}=0; return $command{'self'}; - } - if ("\u$answer" eq 'N') { + + } elsif ("\u$answer" eq 'N') { $vars{'page'}+=1 unless $lastline>$lines; return $command{'self'}; - } - if ("\u$answer" eq 'P') { + + } elsif ("\u$answer" eq 'P') { $vars{'page'}-=1 if $vars{'page'}>=1; return $command{'self'}; - } - if (defined $command{"\u$answer"}) { + + } elsif (defined $command{"\u$answer"}) { return $command{"\u$answer"}; + } else { + print "Unknown command: $answer\n\n"; return $command{'self'}; } } @@ -690,7 +700,7 @@ EOF ; } other_options qw(R Q); - my $answer=prompt 'Enter command'; + my $answer = prompt 'Enter command'; if (unix) { if (("\u$answer" eq 'L') and !$vars{'from_dvd'}) { @@ -723,25 +733,28 @@ EOF return $command{'self'}; } } + if ("\u$answer" eq 'P') { toggle 'option_letter'; return $command{'self'}; - } - if ("\u$answer" eq 'F') { + + } elsif ("\u$answer" eq 'F') { toggle 'option_fmt'; return $command{'self'}; - } - if ("\u$answer" eq 'S' and !$vars{'from_dvd'}) { + + } elsif ("\u$answer" eq 'S' and !$vars{'from_dvd'}) { toggle 'option_src'; return $command{'self'}; - } - if ("\u$answer" eq 'D' and !$vars{'from_dvd'}) { + + } elsif ("\u$answer" eq 'D' and !$vars{'from_dvd'}) { toggle 'option_doc'; return $command{'self'}; - } - if (defined $command{"\u$answer"}) { + + } elsif (defined $command{"\u$answer"}) { return $command{"\u$answer"}; + } else { + print "Unknown command: $answer\n\n"; return $command{'self'}; } } @@ -898,6 +911,7 @@ EOF if (defined $command{"\u$answer"}) { return $command{"\u$answer"}; } else { + print "Unknown command: $answer\n\n"; return $command{'self'}; } } |