diff options
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/tlpkg/installer/install-menu-text.pl | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl index 9bfdb028551..d9869d80501 100755 --- a/Master/tlpkg/installer/install-menu-text.pl +++ b/Master/tlpkg/installer/install-menu-text.pl @@ -7,7 +7,8 @@ # or any later version. # # This file implements the text based menu system for the TeX Live installer. -# + +use vars qw(@::end_install_hook $::opt_no_cls); our %vars; our $tlpdb; @@ -26,12 +27,13 @@ my $RETURN = $MENU_CONTINUE; # issue welcome message on end of installation -push @::end_install_hook, sub { if (win32()) { print TeXLive::TLUtils::welcome(); } else { print TeXLive::TLUtils::welcome_paths(); } }; - +push @::end_install_hook, + sub { if (win32()) { print TeXLive::TLUtils::welcome(); } + else { print TeXLive::TLUtils::welcome_paths(); } }; sub clear_screen { return 0 if ($::opt_no_cls); - (unix)? system 'clear':system 'cls'; + system (unix() ? 'clear' : 'cls'); } sub string_to_list { @@ -79,7 +81,7 @@ sub other_options { if ($options[$#options] eq 'diskspace') { pop @options; - calc_depends; + calc_depends (); print "\nOther actions: ". "Disk space required: $vars{'total_size'} MB\n"; } else { @@ -141,7 +143,7 @@ sub binary_menu { printf " %s %s %-16s %s\n", $keys[$index], button($vars{"binary_$binary"}), "$binary", - platform_desc "$binary"; + platform_desc($binary); $keyval{"$keys[$index]"} = "binary_$binary"; ++$index; } @@ -540,7 +542,7 @@ sub input_dirname $answer =~ s!\\!/!g if win32(); # switch to forward slashes my $home = getenv('HOME'); - $home = getenv('USERPROFILE') if (win32); + $home = getenv('USERPROFILE') if win32(); $home ||= '~'; $answer =~ s/^~/$home/; # $home expansion @@ -707,7 +709,7 @@ EOF if ($vars{'src_splitting_supported'} and !$vars{'from_dvd'}) { print " <S> install font/macro source tree: $b_src\n"; } - if (unix and !$vars{'from_dvd'}) { + if (unix() && !$vars{'from_dvd'}) { print <<"EOF"; <L> create symlinks in standard directories: $b_symlinks binaries to: $t_sys_bin @@ -719,17 +721,17 @@ EOF other_options qw(R Q diskspace); my $answer = prompt 'Enter command'; - if (unix) { + if (unix()) { if (("\u$answer" eq 'L') and !$vars{'from_dvd'}) { my $home = getenv('HOME'); - $home = getenv('USERPROFILE') if (win32); + $home = getenv('USERPROFILE') if (win32()); $home ||= '~'; toggle 'option_symlinks'; if ($vars{'option_symlinks'}) { print "New value for binary directory [$sys_bin]: "; chomp($answer=<STDIN>); $vars{'sys_bin'} = "$answer" if (length $answer); - $vars{'sys_bin'} =~ s@\\@/@g if (win32); + $vars{'sys_bin'} =~ s@\\@/@g if (win32()); $vars{'sys_bin'} =~ s/^~/$home/; if ($vars{'sys_bin'}=~/^(.*)\/bin$/) { $vars{'sys_man'}="$1/man"; @@ -738,13 +740,13 @@ EOF print "New value for man directory [$vars{'sys_man'}]: "; chomp($answer=<STDIN>); $vars{'sys_man'}="$answer" if (length $answer); - $vars{'sys_man'} =~ s@\\@/@g if (win32); + $vars{'sys_man'} =~ s@\\@/@g if (win32()); $vars{'sys_man'} =~ s/^~/$home/; print "New value for info directory [$vars{'sys_info'}]: "; chomp($answer=<STDIN>); $vars{'sys_info'}="$answer" if (length $answer); - $vars{'sys_info'} =~ s@\\@/@g if (win32); + $vars{'sys_info'} =~ s@\\@/@g if (win32()); $vars{'sys_info'} =~ s/^~/$home/; } return $command{'self'}; @@ -822,7 +824,7 @@ sub main_menu { ++$vars{'n_collections_selected'} if $vars{$key}==1; } } - calc_depends; + calc_depends(); my %command = ( 'self' => \&main_menu, @@ -834,7 +836,7 @@ sub main_menu { 'V' => \&dvd_hd_toggle, ); if (!$vars{'from_dvd'}) { - $command{'B'} = \&binary_menu if unix; + $command{'B'} = \&binary_menu if unix(); $command{'C'} = \&collection_menu; $command{'L'} = \&language_menu; $command{'S'} = \&scheme_menu; @@ -911,7 +913,7 @@ EOF if ($vars{'src_splitting_supported'}) { print " $b_src install macro/font source tree\n"; } - if (unix) { + if (unix()) { print " $b_symlinks create symlinks in standard directories\n"; } } |