aboutsummaryrefslogtreecommitdiffstats
path: root/find-lang.pl
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-10-23 23:52:10 +0000
committerThierry Vignaud <tv@mageia.org>2012-10-23 23:52:10 +0000
commit686d60ad25a8ec7e97057bb705e9b739d5752df2 (patch)
treeed637317252ec4b4cbef68160502c588cc9cdd35 /find-lang.pl
parent73e6c13cf3d137e8dbc1b6a2d2552847444090a2 (diff)
downloadrpm-setup-686d60ad25a8ec7e97057bb705e9b739d5752df2.tar
rpm-setup-686d60ad25a8ec7e97057bb705e9b739d5752df2.tar.gz
rpm-setup-686d60ad25a8ec7e97057bb705e9b739d5752df2.tar.bz2
rpm-setup-686d60ad25a8ec7e97057bb705e9b739d5752df2.tar.xz
rpm-setup-686d60ad25a8ec7e97057bb705e9b739d5752df2.zip
simplify calls
Diffstat (limited to 'find-lang.pl')
-rwxr-xr-xfind-lang.pl24
1 files changed, 6 insertions, 18 deletions
diff --git a/find-lang.pl b/find-lang.pl
index 995b1d7..4014aa2 100755
--- a/find-lang.pl
+++ b/find-lang.pl
@@ -40,41 +40,29 @@ File::Find::find(
if ($file =~ m!^((.*/share/locale)/([^/@]+)[^/]*).*/([^/]+)\.mo!) {
return if $withoutmo;
my ($pkg, $lang) = ($4, $3);
- if (pkg_match($pkg)) {
- own_file($file, $lang);
- }
+ own_file($file, $lang) if pkg_match($pkg);
} elsif ($file =~ m!^((.*/gnome/help)/([^/]+)/([^/]+))!) {
return if !$withgnome;
my ($pkg, $lang, $langfile) = ($3, $4, $1);
- if (pkg_match($pkg)) {
- parent_to_own($langfile, $file, $lang);
- }
+ parent_to_own($langfile, $file, $lang) if pkg_match($pkg);
} elsif ($file =~ m!^((.*/share/help)/([^/]+)/([^/]+))/([^/]+)!) {
return if !$withhelp;
my ($pkg, $lang, $langfile) = ($4, $3, $1);
- if (pkg_match($pkg)) {
- parent_to_own($langfile, $file, $lang);
- }
+ parent_to_own($langfile, $file, $lang) if pkg_match($pkg);
} elsif ($file =~ m!^((.*/doc/kde)/HTML/([^/@]+)[^/]*)/([^/]+)/!) {
return if !$withkde;
my ($pkg, $lang, $langfile) = ($4, $3, $1);
- if (pkg_match($pkg)) {
- parent_to_own($langfile, $file, $lang);
- }
+ parent_to_own($langfile, $file, $lang) if pkg_match($pkg);
} elsif ($file =~ m!^((.*/doc)/HTML/([^/@]+)[^/]*)/([^/_]+)!) {
return if !$withhtml;
my ($pkg, $lang, $langfile) = ($4, $3, $1);
- if (pkg_match($pkg)) {
- parent_to_own($langfile, $file, $lang);
- }
+ parent_to_own($langfile, $file, $lang) if pkg_match($pkg);
} elsif ($file =~ m!^((/+usr/share/man)/([^/@.]+)[^/]*)/man[^/]+/([^/.]+)\.\d[^/]*!) {
return if !$withman;
my ($pkg, $lang, $langfile) = ($4, $3, $1);
$file =~ s/\.[^\.]+$//;
$file .= '.*';
- if (pkg_match($pkg)) {
- parent_to_own($langfile, $file, $lang);
- }
+ parent_to_own($langfile, $file, $lang) if pkg_match($pkg);
} else {
return;
}