From 219afd32966778a9ba24a031a7a820c3288b4eba Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 16 Apr 2017 02:13:09 +0000 Subject: treat $opt_in_place special and don't save it into %vars git-svn-id: svn://tug.org/texlive/trunk@43823 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/installer/install-menu-perltk.pl | 13 +++++++------ Master/tlpkg/installer/install-menu-text.pl | 21 +++++++++++---------- 2 files changed, 18 insertions(+), 16 deletions(-) (limited to 'Master/tlpkg') diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl index 14606b03bf0..fd3cf112309 100644 --- a/Master/tlpkg/installer/install-menu-perltk.pl +++ b/Master/tlpkg/installer/install-menu-perltk.pl @@ -34,6 +34,7 @@ use utf8; no utf8; our %vars; +our $opt_in_place; our $tlpdb; our @collections_std; our $texlive_release; @@ -306,7 +307,7 @@ Please select a different mirror.', } })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m"); } - if (!$vars{'in_place'}) { + if (!$opt_in_place) { $row++; $fr->Label(-text => "------- " . __("Basic Information") . " -------") @@ -376,7 +377,7 @@ Please select a different mirror.', ->grid(-row => $row, -column => 1, -sticky => 'w'); $texdirtext = $fr->Label(-anchor => 'w') ->grid(-row => $row, -column => 2, -padx => "2m"); - if (!$vars{'in_place'}) { + if (!$opt_in_place) { if ($::alternative_selector) { $texdir_toggle_button = $fr->Button( -text => __("Change"), -command => sub { menu_edit_texdir("TEXDIR"); }) @@ -493,7 +494,7 @@ Please select a different mirror.', toggle_and_set_opt_variable(\$vars{'option_fmt'}, \$fmtyesno); }) ->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m"); - if ($vars{'doc_splitting_supported'} and !$vars{'in_place'}) { + if ($vars{'doc_splitting_supported'} and !$opt_in_place) { $row++; $fr->Label(-text => __('Install font/macro doc tree'), -anchor => 'w') ->grid(-row => $row, -column => 1, -sticky => 'w'); @@ -506,7 +507,7 @@ Please select a different mirror.', ->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m"); } - if ($vars{'src_splitting_supported'} and !$vars{'in_place'}) { + if ($vars{'src_splitting_supported'} and !$opt_in_place) { $row++; $fr->Label(-text => __('Install font/macro source tree'), -anchor => 'w') ->grid(-row => $row, -column => 1, -sticky => 'w'); @@ -583,7 +584,7 @@ Please select a different mirror.', ->grid(-row => $row, -column => 1, -sticky => 'w'); $fr->Label(-anchor => 'w', -textvariable => \$editoryesno) ->grid(-row => $row, -column => 2, -padx => "2m"); - if (!$vars{'in_place'}) { + if (!$opt_in_place) { $texworks_toggle_button = $fr->Button( -text => __("Toggle"), -command => sub { @@ -705,7 +706,7 @@ sub pre_warn { return $ans eq $b_quit; } -# this sub will not be called if $vars{'in_place'} +# this sub will not be called if $opt_in_place sub menu_edit_texdir { my $key = shift; our $addyear = 1; diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl index edb68277872..521fa0af8cc 100644 --- a/Master/tlpkg/installer/install-menu-text.pl +++ b/Master/tlpkg/installer/install-menu-text.pl @@ -12,6 +12,7 @@ use vars qw(@::end_install_hook $::opt_no_cls); our %vars; +our $opt_in_place; our $tlpdb; our @media_available; our $media; @@ -508,7 +509,7 @@ sub directories_menu } my $texmfdir = $vars{'TEXDIR'} . ($vars{'TEXDIR'} =~ /\/$/ ? 'texmf-dist' : '/texmf-dist'); - if (!$vars{'in_place'}) { + if (!$opt_in_place) { print <<"EOF"; <1> TEXDIR: $vars{'TEXDIR'} support tree: $texmfdir @@ -542,7 +543,7 @@ EOF other_options qw(R Q); my $answer = prompt 'Enter command'; - if ("\u$answer" eq '1' and !$vars{'in_place'}) { + if ("\u$answer" eq '1' and !$opt_in_place) { print "New value for TEXDIR [$vars{'TEXDIR'}]: "; $answer = &input_dirname (); $vars{'TEXDIR'} = $answer if $answer ne ""; @@ -792,10 +793,10 @@ sub options_menu { create format files: $b_fmt EOF ; - if ($vars{'doc_splitting_supported'} and !$vars{'in_place'}) { + if ($vars{'doc_splitting_supported'} and !$opt_in_place) { print " install font/macro doc tree: $b_doc\n"; } - if ($vars{'src_splitting_supported'} and !$vars{'in_place'}) { + if ($vars{'src_splitting_supported'} and !$opt_in_place) { print " install font/macro source tree: $b_src\n"; } if (!$vars{'portable'}) { @@ -922,11 +923,11 @@ EOF toggle 'option_write18_restricted'; return $command{'self'}; - } elsif ("\u$answer" eq 'S' and !$vars{'in_place'}) { + } elsif ("\u$answer" eq 'S' and !$opt_in_place) { toggle 'option_src'; return $command{'self'}; - } elsif ("\u$answer" eq 'D' and !$vars{'in_place'}) { + } elsif ("\u$answer" eq 'D' and !$opt_in_place) { toggle 'option_doc'; return $command{'self'}; @@ -934,7 +935,7 @@ EOF return $command{"\u$answer"}; } elsif (("\u$answer" eq 'W') && ($::opt_all_options || win32()) && - !$vars{'in_place'} ) { + !$opt_in_place ) { toggle 'collection-texworks'; return $command{'self'}; @@ -1026,7 +1027,7 @@ sub main_menu { 'V' => \&toggle_portable, 'P' => \&callback_save_profile, ); - if (!$vars{'in_place'}) { + if (!$opt_in_place) { $command{'B'} = \&binary_menu if unix(); $command{'C'} = \&collection_menu; $command{'S'} = \&scheme_menu; @@ -1043,7 +1044,7 @@ sub main_menu { $warn_nobin EOF - if (!$vars{'in_place'}) { + if (!$opt_in_place) { print <<"EOF"; set binary platforms: $vars{'n_systems_selected'} out of $vars{'n_systems_available'} @@ -1093,7 +1094,7 @@ print <<"EOF"; $b_fmt create all format files EOF - if (!$vars{'in_place'}) { + if (!$opt_in_place) { if ($vars{'doc_splitting_supported'}) { print " $b_doc install macro/font doc tree\n"; } -- cgit v1.2.3