diff options
author | Norbert Preining <preining@logic.at> | 2008-04-03 17:45:04 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-04-03 17:45:04 +0000 |
commit | 4e1f03943679d63d28186364e040a31dd3560b9f (patch) | |
tree | 595828b04be09d1c30f7295cb92f2ce29a736b9b /Master | |
parent | 0926eb986894aa71ec0df1ec2b9bf4318b6d82ab (diff) |
expand ~ in symlink menus
git-svn-id: svn://tug.org/texlive/trunk@7305 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/tlpkg/installer/install-menu-perltk.pl | 6 | ||||
-rwxr-xr-x | Master/tlpkg/installer/install-menu-text.pl | 12 |
2 files changed, 16 insertions, 2 deletions
diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl index 169b1388126..6e7fb965b7a 100644 --- a/Master/tlpkg/installer/install-menu-perltk.pl +++ b/Master/tlpkg/installer/install-menu-perltk.pl @@ -510,6 +510,12 @@ sub menu_select_symlink { } sub return_callback { if ($osym) { + my $home = getenv('HOME'); + $home = getenv('USERPROFILE') if (win32); + $home ||= '~'; + $lbin =~ s/^~/$home/; + $linfo =~ s/^~/$home/; + $lman =~ s/^~/$home/; $vars{'sys_bin'} = $lbin; $vars{'sys_info'} = $linfo; $vars{'sys_man'} = $lman; diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl index c3d01a7a885..7bd49d79eb9 100755 --- a/Master/tlpkg/installer/install-menu-text.pl +++ b/Master/tlpkg/installer/install-menu-text.pl @@ -688,12 +688,16 @@ EOF if (unix) { if ("\u$answer" eq 'L') { + my $home = getenv('HOME'); + $home = getenv('USERPROFILE') if (win32); + $home ||= '~'; toggle 'option_symlinks'; if ($vars{'option_symlinks'}) { print "New value for binary directory [$sys_bin]: "; chomp($answer=<STDIN>); - $vars{'sys_bin'}="$answer" if (length $answer); - + $vars{'sys_bin'} = "$answer" if (length $answer); + $vars{'sys_bin'} =~ s@\\@/@g if (win32); + $vars{'sys_bin'} =~ s/^~/$home/; if ($vars{'sys_bin'}=~/^(.*)\/bin$/) { $vars{'sys_man'}="$1/man"; $vars{'sys_info'}="$1/info"; @@ -701,10 +705,14 @@ EOF print "New value for man directory [$vars{'sys_man'}]: "; chomp($answer=<STDIN>); $vars{'sys_man'}="$answer" if (length $answer); + $vars{'sys_man'} =~ s@\\@/@g if (win32); + $vars{'sys_man'} =~ s/^~/$home/; print "New value for info directory [$vars{'sys_info'}]: "; chomp($answer=<STDIN>); $vars{'sys_info'}="$answer" if (length $answer); + $vars{'sys_info'} =~ s@\\@/@g if (win32); + $vars{'sys_info'} =~ s/^~/$home/; } return $command{'self'}; } |