summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-06-18 00:49:49 +0000
committerKarl Berry <karl@freefriends.org>2009-06-18 00:49:49 +0000
commiteaad857c2b3b3232880bf6a432f1c4de56d1ac75 (patch)
treefe2a07215fcceedf152fbbe962edfb5635ef8fcc /Master/tlpkg/TeXLive
parent2f85d60ca38e9e04784d424b7b508d694c1be030 (diff)
attempt to do .exe addition within tlpkg/installer too
git-svn-id: svn://tug.org/texlive/trunk@13800 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r--Master/tlpkg/TeXLive/TLTREE.pm22
1 files changed, 13 insertions, 9 deletions
diff --git a/Master/tlpkg/TeXLive/TLTREE.pm b/Master/tlpkg/TeXLive/TLTREE.pm
index 95c882dfdb6..ccb67ae6a5f 100644
--- a/Master/tlpkg/TeXLive/TLTREE.pm
+++ b/Master/tlpkg/TeXLive/TLTREE.pm
@@ -230,10 +230,12 @@ sub _get_matching_files {
# * -> .*
# ? -> .
# + -> \+
-sub _get_files_matching_glob_pattern {
+sub _get_files_matching_glob_pattern
+{
my $self = shift;
my ($type,$globline) = @_;
my @returnfiles;
+
my $dirpart = TeXLive::TLUtils::dirname($globline);
my $basepart = TeXLive::TLUtils::basename($globline);
$basepart =~ s/\./\\./g;
@@ -241,8 +243,9 @@ sub _get_files_matching_glob_pattern {
$basepart =~ s/\?/./g;
$basepart =~ s/\+/\\+/g;
return unless (defined($self->{'_filesofdir'}{$dirpart}));
+
my @candfiles = @{$self->{'_filesofdir'}{$dirpart}};
- foreach my $f (@candfiles) {
+ for my $f (@candfiles) {
ddebug("matching $f in $dirpart via glob $globline\n");
if ($f =~ /^$basepart$/) {
ddebug("hit: globline=$globline, $dirpart/$f\n");
@@ -253,15 +256,16 @@ sub _get_files_matching_glob_pattern {
}
}
}
- if (($dirpart =~ m@^bin/win32@) || ($dirpart =~ m@^bin/i386-cygwin@)) {
- # for arch=win32 under bin we want to automatch more extensions.
+
+ if ($dirpart =~ m,^bin/(win32|i386-cygwin),
+ || $dirpart =~ m,tlpkg/installer,) {
+ # for windows-iwsh we want to automatch more extensions.
foreach my $f (@candfiles) {
my $w32_binext;
- if ($dirpart =~ m@^bin/win32@) {
- $w32_binext = "bat|cmd|exe|dll|texlua";
+ if ($dirpart =~ m,^bin/i386-cygwin,) {
+ $w32_binext = "exe"; # cygwin has .exe but nothing else
} else {
- # cygwin part, they have .exe, but nothing else
- $w32_binext = "exe";
+ $w32_binext = "bat|cmd|exe|dll|texlua";
}
ddebug("matching $f in $dirpart via glob $globline.($w32_binext)\n");
if ($f =~ /^$basepart\.($w32_binext)$/) {
@@ -274,7 +278,7 @@ sub _get_files_matching_glob_pattern {
}
}
}
- return(@returnfiles);
+ return @returnfiles;
}
sub _get_files_matching_regexp_pattern {