summaryrefslogtreecommitdiff
path: root/Master/tlpkg/installer/install-menu-text.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/installer/install-menu-text.pl')
-rwxr-xr-xMaster/tlpkg/installer/install-menu-text.pl12
1 files changed, 6 insertions, 6 deletions
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.,