From 686d60ad25a8ec7e97057bb705e9b739d5752df2 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 23 Oct 2012 23:52:10 +0000 Subject: simplify calls --- find-lang.pl | 24 ++++++------------------ 1 file 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; } -- cgit v1.2.1