diff options
-rw-r--r-- | find-lang.pl | 6 |
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)"; |