aboutsummaryrefslogtreecommitdiffstats
path: root/find-lang.pl
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2007-06-25 15:08:08 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2007-06-25 15:08:08 +0000
commit1559f3e7852fcdc896ea0791fafa65a0047741bb (patch)
tree33951586d9f446ff2f04dcede6fad5c06f3ddb03 /find-lang.pl
parent1471dbec96a4334c360ca2b678144d3cbf91b646 (diff)
downloadrpm-setup-1559f3e7852fcdc896ea0791fafa65a0047741bb.tar
rpm-setup-1559f3e7852fcdc896ea0791fafa65a0047741bb.tar.gz
rpm-setup-1559f3e7852fcdc896ea0791fafa65a0047741bb.tar.bz2
rpm-setup-1559f3e7852fcdc896ea0791fafa65a0047741bb.tar.xz
rpm-setup-1559f3e7852fcdc896ea0791fafa65a0047741bb.zip
- allow to pass multiple name to find
Diffstat (limited to 'find-lang.pl')
-rw-r--r--find-lang.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/find-lang.pl b/find-lang.pl
index b40ea46..9eec2a3 100644
--- a/find-lang.pl
+++ b/find-lang.pl
@@ -17,7 +17,9 @@ GetOptions(
'with-man' => \my $withman,
) or pod2usage();
-my ($buildroot, $pkgname) = @ARGV;
+my ($buildroot, @searchname) = @ARGV;
+my ($pkgname) = @searchname or die "Main name to find missing\n";
+$buildroot or die "No buildroot given\n";
my %finallist = (); # filename => attr, easy way to perform uniq
@@ -54,7 +56,7 @@ find(
} else {
return;
}
- if ($pkg ne $pkgname && !$allname) {
+ if (!((grep { $_ eq $pkg } @searchname) || $allname)) {
return;
}
my $rpmlang = $lang eq 'C' ? "" : "%lang($lang)";