From 1471dbec96a4334c360ca2b678144d3cbf91b646 Mon Sep 17 00:00:00 2001 From: Olivier Thauvin Date: Mon, 25 Jun 2007 15:02:20 +0000 Subject: - manage man page too --- find-lang.pl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'find-lang.pl') 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; @@ -43,6 +44,12 @@ find( if (!$withhtml) { 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 { -- cgit v1.2.1