From bf98f7457f356622f1c443bd09ad1c34a5154dac Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 28 Nov 2008 23:54:01 +0000 Subject: (directories_menu): move home expansion to ... (input_dirname): ... here, where it's needed. git-svn-id: svn://tug.org/texlive/trunk@11463 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/installer/install-menu-text.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Master') diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl index 86e8fd32de7..9bfdb028551 100755 --- a/Master/tlpkg/installer/install-menu-text.pl +++ b/Master/tlpkg/installer/install-menu-text.pl @@ -433,7 +433,8 @@ sub language_menu { } -sub directories_menu { +sub directories_menu +{ my %command=( 'self' => \&directories_menu, 'R' => \&main_menu, @@ -479,11 +480,6 @@ EOF other_options qw(R Q); my $answer = prompt 'Enter command'; - my $dir; - - my $home = getenv('HOME'); - $home = getenv('USERPROFILE') if (win32); - $home ||= '~'; if ("\u$answer" eq '1') { print "New value for $maindir [$vars{$maindir}]: "; $answer = &input_dirname (); @@ -542,6 +538,10 @@ sub input_dirname return "" if $answer eq ""; $answer =~ s!\\!/!g if win32(); # switch to forward slashes + + my $home = getenv('HOME'); + $home = getenv('USERPROFILE') if (win32); + $home ||= '~'; $answer =~ s/^~/$home/; # $home expansion # relative paths are unlikely to work in texmf.cnf, et al., -- cgit v1.2.3