[debhelper-devel] [debhelper] 01/03: dh_installexamples: use find + xargs instead of find -exec

Niels Thykier nthykier at moszumanska.debian.org
Fri Nov 6 21:06:55 UTC 2015


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

nthykier pushed a commit to branch master
in repository debhelper.

commit f2aebbf75fe10f45e8baf5c7ac370de06a1ff9e6
Author: Niko Tyni <ntyni at debian.org>
Date:   Mon Oct 12 14:47:35 2015 +0300

    dh_installexamples: use find + xargs instead of find -exec
    
    Commit 71d06996481c6187b016c3b14b7e9faaf8adc432 changed most of the find
    -exec invocations in dh_install* programs, but this one remains. Use
    xargs instead to prepare for an additional sort command in the pipeline.
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 dh_installexamples | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dh_installexamples b/dh_installexamples
index c39e899..9ec6914 100755
--- a/dh_installexamples
+++ b/dh_installexamples
@@ -97,7 +97,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 				my $pwd=`pwd`;
 				chomp $pwd;
 				my $exclude2 = '-type f'.$exclude;
-				complex_doit("cd '$dir' && find '$basename' -type f$exclude -exec cp --reflink=auto --parents -dp {} $pwd/$tmp/usr/share/doc/$package/examples \\;");
+				complex_doit("cd '$dir' && " .
+							 "find '$basename' -type f$exclude -print0 | xargs -0 -I {} cp --reflink=auto --parents -dp {} $pwd/$tmp/usr/share/doc/$package/examples");
 			}
 			else {
 				doit("cp", '--reflink=auto', "-a", $example,

-- 
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