aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfind-lang.pl28
1 files changed, 7 insertions, 21 deletions
diff --git a/find-lang.pl b/find-lang.pl
index 5b0065c..995b1d7 100755
--- a/find-lang.pl
+++ b/find-lang.pl
@@ -38,49 +38,37 @@ File::Find::find(
-f $File::Find::name or -l $File::Find::name or return;
debug("next file is %s", $file);
if ($file =~ m!^((.*/share/locale)/([^/@]+)[^/]*).*/([^/]+)\.mo!) {
- if ($withoutmo) {
- return;
- }
+ return if $withoutmo;
my ($pkg, $lang) = ($4, $3);
if (pkg_match($pkg)) {
own_file($file, $lang);
}
} elsif ($file =~ m!^((.*/gnome/help)/([^/]+)/([^/]+))!) {
- if (!$withgnome) {
- return;
- }
+ return if !$withgnome;
my ($pkg, $lang, $langfile) = ($3, $4, $1);
if (pkg_match($pkg)) {
parent_to_own($langfile, $file, $lang);
}
} elsif ($file =~ m!^((.*/share/help)/([^/]+)/([^/]+))/([^/]+)!) {
- if (!$withhelp) {
- return;
- }
+ return if !$withhelp;
my ($pkg, $lang, $langfile) = ($4, $3, $1);
if (pkg_match($pkg)) {
parent_to_own($langfile, $file, $lang);
}
} elsif ($file =~ m!^((.*/doc/kde)/HTML/([^/@]+)[^/]*)/([^/]+)/!) {
- if (!$withkde) {
- return;
- }
+ return if !$withkde;
my ($pkg, $lang, $langfile) = ($4, $3, $1);
if (pkg_match($pkg)) {
parent_to_own($langfile, $file, $lang);
}
} elsif ($file =~ m!^((.*/doc)/HTML/([^/@]+)[^/]*)/([^/_]+)!) {
- if (!$withhtml) {
- return;
- }
+ return if !$withhtml;
my ($pkg, $lang, $langfile) = ($4, $3, $1);
if (pkg_match($pkg)) {
parent_to_own($langfile, $file, $lang);
}
} elsif ($file =~ m!^((/+usr/share/man)/([^/@.]+)[^/]*)/man[^/]+/([^/.]+)\.\d[^/]*!) {
- if (!$withman) {
- return;
- }
+ return if !$withman;
my ($pkg, $lang, $langfile) = ($4, $3, $1);
$file =~ s/\.[^\.]+$//;
$file .= '.*';
@@ -117,9 +105,7 @@ exit(0);
sub pkg_match {
my ($pkg) = @_;
return 1 if $allname;
- if (grep { $_ eq $pkg } @searchname) {
- return 1;
- }
+ return 1 if grep { $_ eq $pkg } @searchname;
return;
}