aboutsummaryrefslogtreecommitdiffstats
path: root/find-lang.pl
diff options
context:
space:
mode:
Diffstat (limited to 'find-lang.pl')
-rw-r--r--find-lang.pl25
1 files changed, 13 insertions, 12 deletions
diff --git a/find-lang.pl b/find-lang.pl
index 3c66e13..8b4f007 100644
--- a/find-lang.pl
+++ b/find-lang.pl
@@ -37,31 +37,32 @@ File::Find::find(
-f $File::Find::name or return;
debug("next file is %s", $file);
my ($pkg, $lang, $parent);
+ my $langfile = $file;
if ($file =~ m:^((.*/share/locale)/([^/@]+)[^/]*).*/([^/]+)\.mo:) {
if ($withoutmo) {
return;
}
- ($pkg, $lang, $parent) = ($4, $3, $2);
- } elsif ($file =~ m:^(.*/gnome/help)/([^/]+)/([^/]+).*$:) {
+ ($pkg, $lang, $parent, $langfile) = ($4, $3, $2, $1);
+ } elsif ($file =~ m:^((.*/gnome/help)/([^/]+)/([^/]+)).*$:) {
if (!$withgnome) {
return;
}
- ($pkg, $lang, $parent) = ($2, $3, $1);
- } elsif ($file =~ m:^(.*/doc/kde)/HTML/([^/@]+)[^/]*/([^/]+)/.*$:) {
+ ($pkg, $lang, $parent, $langfile) = ($3, $4, $2, $1);
+ } elsif ($file =~ m:^((.*/doc/kde)/HTML/([^/@]+)[^/]*)/([^/]+)/.*$:) {
if (!$withkde) {
return;
}
- ($pkg, $lang, $parent) = ($2, $3, $1);
- } elsif ($file =~ m:^(.*/doc)/HTML/([^/@]+)[^/]*/([^/_]+).*$:) {
+ ($pkg, $lang, $parent, $langfile) = ($4, $3, $2, $1);
+ } elsif ($file =~ m:^((.*/doc)/HTML/([^/@]+)[^/]*)/([^/_]+).*$:) {
if (!$withhtml) {
return;
}
- ($pkg, $lang, $parent) = ($3, $2, $1);
- } elsif ($file =~ m:^(/+usr/share/man)/([^/@\.]+)[^/]*/man[^/]+/([^/.]+)\.\d[^/]*$:) {
+ ($pkg, $lang, $parent, $langfile) = ($4, $3, $2, $1);
+ } elsif ($file =~ m:^((/+usr/share/man)/([^/@\.]+)[^/]*)/man[^/]+/([^/.]+)\.\d[^/]*$:) {
if (!$withman) {
return;
}
- ($pkg, $lang, $parent) = ($3, $2, $1);
+ ($pkg, $lang, $parent, $langfile) = ($4, $3, undef, $1);
$file =~ s/\.[^\.]+$//;
$file .= '.*';
} else {
@@ -71,9 +72,9 @@ File::Find::find(
return;
}
- parent_to_own($parent, $file, $lang);
- $finallist{$file}{'lang'}{$lang} = 1;
- debug("File %s will be %s", $file, $lang);
+ parent_to_own($parent, $langfile, $lang) if ($parent);
+ $finallist{$langfile}{'lang'}{$lang} = 1;
+ debug("File %s will be %s", $langfile, $lang);
},
$buildroot || '/'