aboutsummaryrefslogtreecommitdiffstats
path: root/find-lang.pl
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2007-08-24 16:51:40 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2007-08-24 16:51:40 +0000
commiteaa71f3c7c7b485c5baa3e205eb95f81a88eda15 (patch)
tree5cf14892e4efaadb0d779e43991942356e31ff89 /find-lang.pl
parent11b8804b1e55d3f43a072270b127986fe4fc312e (diff)
downloadrpm-setup-eaa71f3c7c7b485c5baa3e205eb95f81a88eda15.tar
rpm-setup-eaa71f3c7c7b485c5baa3e205eb95f81a88eda15.tar.gz
rpm-setup-eaa71f3c7c7b485c5baa3e205eb95f81a88eda15.tar.bz2
rpm-setup-eaa71f3c7c7b485c5baa3e205eb95f81a88eda15.tar.xz
rpm-setup-eaa71f3c7c7b485c5baa3e205eb95f81a88eda15.zip
- only own parent dir and let rpm find content
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 || '/'