summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2011-04-08 20:00:58 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2011-04-08 20:00:58 +0000
commit963ac9ae61e49b46c7ca2489c7e7b7d0630bcf2c (patch)
tree8800f41f0e2f36050502c54965b0a1bb89bda233
parentcf38fd8201cd87f139cd3e14bae445fe41a06abe (diff)
Fix double (back)slashes
git-svn-id: svn://tug.org/texlive/trunk@22025 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/tlpkg/installer/install-menu-perltk-new.pl16
-rwxr-xr-xMaster/tlpkg/installer/install-menu-text-new.pl45
2 files changed, 34 insertions, 27 deletions
diff --git a/Master/tlpkg/installer/install-menu-perltk-new.pl b/Master/tlpkg/installer/install-menu-perltk-new.pl
index 6cb806fbb92..6d12fff3d8b 100644
--- a/Master/tlpkg/installer/install-menu-perltk-new.pl
+++ b/Master/tlpkg/installer/install-menu-perltk-new.pl
@@ -968,15 +968,19 @@ sub callback_edit_directories {
$vars{'TEXMFSYSVAR'} =~ s/^~/$home/;
$vars{'TEXMFSYSCONFIG'} =~ s/^~/$home/;
# only if we set TEXDIR we set the others in parallel
+ my $texdirnoslash;
if ($key eq "TEXDIR") {
if ($vars{'TEXDIR'}=~/^(.*)\/$texlive_release$/) {
- $vars{'TEXMFLOCAL'}="$1/texmf-local";
- $vars{'TEXMFSYSVAR'}="$1/$texlive_release/texmf-var";
- $vars{'TEXMFSYSCONFIG'}="$1/$texlive_release/texmf-config";
+ $texdirnoslash = $1;
+ $vars{'TEXMFLOCAL'}="$texdirnoslash/texmf-local";
+ $vars{'TEXMFSYSVAR'}="$texdirnoslash/$texlive_release/texmf-var";
+ $vars{'TEXMFSYSCONFIG'}="$texdirnoslash/$texlive_release/texmf-config";
} elsif ($vars{'TEXDIR'}=~/^(.*)$/) {
- $vars{'TEXMFLOCAL'}="$1/texmf-local";
- $vars{'TEXMFSYSVAR'}="$1/texmf-var";
- $vars{'TEXMFSYSCONFIG'}="$1/texmf-config";
+ $texdirnoslash = $1;
+ $texdirnoslash =~ s!/$!!;
+ $vars{'TEXMFLOCAL'}="$texdirnoslash/texmf-local";
+ $vars{'TEXMFSYSVAR'}="$texdirnoslash/texmf-var";
+ $vars{'TEXMFSYSCONFIG'}="$texdirnoslash/texmf-config";
}
$vars{'TEXDIRW'}=$vars{'TEXDIR'}
}
diff --git a/Master/tlpkg/installer/install-menu-text-new.pl b/Master/tlpkg/installer/install-menu-text-new.pl
index bb97e2b21f3..a9c5cad4499 100755
--- a/Master/tlpkg/installer/install-menu-text-new.pl
+++ b/Master/tlpkg/installer/install-menu-text-new.pl
@@ -73,7 +73,8 @@ sub other_options {
'Q' => 'quit'
);
- $opts{'I'}=$vars{'portable'} ? 'start portable installation' : 'start installation to hard disk';
+ $opts{'I'}=$vars{'portable'} ? 'start portable installation' :
+ 'start installation to hard disk';
print "\nActions:";
if ($options[$#options] eq 'diskspace') {
@@ -455,24 +456,24 @@ sub directories_menu
'Q' => \&quit
);
- my $maindir = 'TEXDIR';
-
menu_head "Directories setup:";
- if (!TeXLive::TLUtils::texdir_check($vars{$maindir})) {
+ if (!TeXLive::TLUtils::texdir_check($vars{'TEXDIR'})) {
print "!! The default location as given below can't be written to.
!! Either change the destination directory using <1> or create it
!! outside this script.
";
}
+ my $texmfdir = $vars{'TEXDIR'} .
+ ($vars{'TEXDIR'} =~ /\/$/ ? 'texmf' : '/texmf');
if (!$vars{'in_place'}) {
print <<"EOF";
<1> TEXDIR: $vars{'TEXDIR'}
- support tree: $vars{'TEXDIR'}/texmf
+ support tree: $texmfdir
EOF
} else {
print <<"EOF";
TEXDIR: $vars{'TEXDIR'}
- support tree: $vars{'TEXDIR'}/texmf
+ support tree: $texmfdir
EOF
}
if (!$vars{'portable'}) {
@@ -499,17 +500,21 @@ EOF
my $answer = prompt 'Enter command';
if ("\u$answer" eq '1' and !$vars{'in_place'}) {
- print "New value for $maindir [$vars{$maindir}]: ";
+ print "New value for TEXDIR [$vars{'TEXDIR'}]: ";
$answer = &input_dirname ();
- $vars{$maindir} = $answer if $answer ne "";
- if ($vars{$maindir}=~/^(.*)\/$texlive_release$/) {
- $vars{'TEXMFLOCAL'}="$1/texmf-local";
- $vars{'TEXMFSYSVAR'}="$1/$texlive_release/texmf-var";
- $vars{'TEXMFSYSCONFIG'}="$1/$texlive_release/texmf-config";
- } elsif ($vars{$maindir}=~/^(.*)$/) {
- $vars{'TEXMFLOCAL'}="$1/texmf-local";
- $vars{'TEXMFSYSVAR'}="$1/texmf-var";
- $vars{'TEXMFSYSCONFIG'}="$1/texmf-config";
+ $vars{'TEXDIR'} = $answer if $answer ne "";
+ my $texdirnoslash;
+ if ($vars{'TEXDIR'}=~/^(.*)\/$texlive_release$/) {
+ $texdirnoslash = $1;
+ $vars{'TEXMFLOCAL'}="$texdirnoslash/texmf-local";
+ $vars{'TEXMFSYSVAR'}="$texdirnoslash/$texlive_release/texmf-var";
+ $vars{'TEXMFSYSCONFIG'}="$texdirnoslash/$texlive_release/texmf-config";
+ } elsif ($vars{'TEXDIR'}=~/^(.*)$/) {
+ $texdirnoslash = $1;
+ $texdirnoslash =~ s!/$!!;
+ $vars{'TEXMFLOCAL'}="$texdirnoslash/texmf-local";
+ $vars{'TEXMFSYSVAR'}="$texdirnoslash/texmf-var";
+ $vars{'TEXMFSYSCONFIG'}="$texdirnoslash/texmf-config";
}
return $command{'self'};
@@ -925,8 +930,6 @@ sub main_menu {
$warn_nobin=set_install_platform;
- my $maindir = 'TEXDIR';
-
$vars{'n_systems_selected'}=0;
$vars{'n_collections_selected'}=0;
foreach my $key (keys %vars) {
@@ -989,10 +992,10 @@ EOF
TEXDIR (the main TeX directory):
EOF
- if (TeXLive::TLUtils::texdir_check($vars{$maindir})) {
- print " $vars{$maindir}\n";
+ if (TeXLive::TLUtils::texdir_check($vars{'TEXDIR'})) {
+ print " $vars{'TEXDIR'}\n";
} else {
- print " !! default location: $vars{$maindir}\n";
+ print " !! default location: $vars{'TEXDIR'}\n";
print " !! is not writable, please select a different one!\n";
}
print <<"EOF";