aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--find-lang.pl11
1 files changed, 10 insertions, 1 deletions
diff --git a/find-lang.pl b/find-lang.pl
index e0fffe7..b40ea46 100644
--- a/find-lang.pl
+++ b/find-lang.pl
@@ -14,6 +14,7 @@ GetOptions(
'with-kde' => \my $withkde,
'with-html' => \my $withhtml,
'without-mo' => \my $withoutmo,
+ 'with-man' => \my $withman,
) or pod2usage();
my ($buildroot, $pkgname) = @ARGV;
@@ -44,6 +45,12 @@ find(
return;
}
($pkg, $lang, $parent) = ($3, $2, $1);
+ } elsif ($file =~ m:^(/usr/share/man)/([^/_@\.]+)[^/]*/man[^/]+/([^/.]+)\.\d\.[^/]+$:) {
+ if (!$withman) {
+ return;
+ }
+
+ ($pkg, $lang, $parent) = ($3, $2, $1);
} else {
return;
}
@@ -62,9 +69,11 @@ find(
open(my $hlang, ">", "$pkgname.lang") or die "canno't open $pkgname.lang\n";
foreach (sort keys %finallist) {
- print "$finallist{$_}$_\n";
+ print $hlang "$finallist{$_}$_\n";
}
+close($hlang);
+
exit(0);
sub parent_to_own {