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.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl
index 8dcc0ebed54..fc1c536edd2 100755
--- a/Master/tlpkg/installer/install-menu-text.pl
+++ b/Master/tlpkg/installer/install-menu-text.pl
@@ -471,11 +471,15 @@ EOF
other_options qw (R Q);
my $answer=prompt 'Enter command';
+ my $home = getenv('HOME');
+ $home = getenv('USERPROFILE') if (win32);
+ $home ||= '~';
if ("\u$answer" eq '1') {
print "New value TEXDIR [$vars{'TEXDIR'}]: ";
chomp($answer=<STDIN>);
$vars{'TEXDIR'}="$answer" if (length $answer);
$vars{'TEXDIR'}=~s@\\@/@g if (win32);
+ $vars{'TEXDIR'} =~ s/^~/$home/;
if ($vars{'TEXDIR'}=~/^(.*)\/$texlive_release$/) {
$vars{'TEXMFLOCAL'}="$1/texmf-local";
$vars{'TEXMFSYSVAR'}="$1/$texlive_release/texmf-var";
@@ -491,6 +495,7 @@ EOF
chomp($answer=<STDIN>);
$vars{'TEXMFLOCAL'}="$answer" if (length $answer);
$vars{'TEXMFLOCAL'}=~s@\\@/@g if (win32);
+ $vars{'TEXMFLOCAL'} =~ s/^~/$home/;
return $command{'self'};
}
if ("\u$answer" eq '3') {
@@ -498,6 +503,7 @@ EOF
chomp($answer=<STDIN>);
$vars{'TEXMFSYSVAR'}="$answer" if (length $answer);
$vars{'TEXMFSYSVAR'}=~s@\\@/@g if (win32);
+ $vars{'TEXMFSYSVAR'} =~ s/^~/$home/;
return $command{'self'};
}
if ("\u$answer" eq '4') {