summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-11-28 23:54:01 +0000
committerKarl Berry <karl@freefriends.org>2008-11-28 23:54:01 +0000
commitbf98f7457f356622f1c443bd09ad1c34a5154dac (patch)
tree1fffaa1e8661ea90f836613c771182e5e9836131 /Master
parent6a36fd15a42a724918786ab6ec2f9fe06e1547b3 (diff)
(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
Diffstat (limited to 'Master')
-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.,