summaryrefslogtreecommitdiff
path: root/dh_install
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2013-08-15 20:14:44 +0200
committerJoey Hess <joey@kitenet.net>2013-08-15 20:21:26 +0200
commit71d06996481c6187b016c3b14b7e9faaf8adc432 (patch)
treecbdb8882f31a7348e2b039c2bb3ca3aae171ca76 /dh_install
parentfeb76f76e099df14be6ca5c33baf91d0a4f307a9 (diff)
dh_install, dh_installdocs, dh_clean: Fix uses of find -exec which cause it to ignore exit status of the commands run.
Diffstat (limited to 'dh_install')
-rwxr-xr-xdh_install4
1 files changed, 2 insertions, 2 deletions
diff --git a/dh_install b/dh_install
index 7a6cc61d..b89d7d1c 100755
--- a/dh_install
+++ b/dh_install
@@ -203,10 +203,10 @@ foreach my $package (getpackages()) {
my $dir = ($basename eq '.') ? $src : "$src/..";
my $pwd=`pwd`;
chomp $pwd;
- complex_doit("cd '$dir' && find '$basename' $exclude \\( -type f -or -type l \\) -exec cp --parents -dp {} $pwd/$tmp/$dest/ \\;");
+ complex_doit("cd '$dir' && find '$basename' $exclude \\( -type f -or -type l \\) -print0 | xargs -0 -I {} cp --parents -dp {} $pwd/$tmp/$dest/");
# cp is annoying so I need a separate pass
# just for empty directories
- complex_doit("cd '$dir' && find '$basename' $exclude \\( -type d -and -empty \\) -exec cp --parents -a {} $pwd/$tmp/$dest/ \\;");
+ complex_doit("cd '$dir' && find '$basename' $exclude \\( -type d -and -empty \\) -print0 | xargs -0 -I {} cp --parents -a {} $pwd/$tmp/$dest/");
}
else {
doit("cp", "-a", $src, "$tmp/$dest/");