[debhelper-devel] [debhelper] 01/06: dh_fixperms: Refactor $mode_0644_find_pattern initialization

Niels Thykier nthykier at moszumanska.debian.org
Mon Apr 17 17:07:03 UTC 2017


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository debhelper.

commit 48341fb4a0c8f7063f9edd6754f29ef7ee443ac9
Author: Niels Thykier <niels at thykier.net>
Date:   Mon Apr 17 16:06:54 2017 +0000

    dh_fixperms: Refactor $mode_0644_find_pattern initialization
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 dh_fixperms | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/dh_fixperms b/dh_fixperms
index fafe451..260577f 100755
--- a/dh_fixperms
+++ b/dh_fixperms
@@ -46,6 +46,10 @@ up a list of things to exclude.
 
 init();
 
+sub patterns2find_expr {
+	return sprintf('\\( -name %s \\)', join(' -o -name ', map { "'$_'" } @_));
+}
+
 my $vendorlib = substr $Config{vendorlib}, 1;
 my $vendorarch = substr $Config{vendorarch}, 1;
 my @mode_0644_patterns = (
@@ -59,9 +63,7 @@ my @mode_0644_patterns = (
 	'*.cmxs',
 );
 # Turn the patterns in to a find pattern
-my $mode_0644_find_pattern = sprintf('\\( -name %s \\)',
-									 join(' -o -name ',
-										  map { "'$_'" } @mode_0644_patterns));
+my $mode_0644_find_pattern = patterns2find_expr(@mode_0644_patterns);
 
 
 foreach my $package (@{$dh{DOPACKAGES}}) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list