From eaa71f3c7c7b485c5baa3e205eb95f81a88eda15 Mon Sep 17 00:00:00 2001 From: Olivier Thauvin Date: Fri, 24 Aug 2007 16:51:40 +0000 Subject: - only own parent dir and let rpm find content --- find-lang.pl | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'find-lang.pl') 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 || '/' -- cgit v1.2.1