- doit("cp","-a",@examples,"$tmp/usr/share/doc/$package/examples");
+ my $exclude = '';
+ if ($dh{EXCLUDE_FIND}) {
+ $exclude .= ' -and ! \( '.$dh{EXCLUDE_FIND}.' \)';
+ }
+
+ foreach my $example (@examples) {
+ next if excludefile($example);
+ if (-d $example && $exclude) {
+ my $basename = basename($example);
+ my $dir = ($basename eq '.') ? $example : "$example/..";
+ my $pwd=`pwd`;
+ chomp $pwd;
+ my $exclude2 = '-type f'.$exclude;
+ complex_doit("cd '$dir' && find '$basename' -type f$exclude -exec cp --parents -dp {} $pwd/$tmp/usr/share/doc/$package/examples \\;");
+ }
+ else {
+ doit("cp", "-a", $example, "$tmp/usr/share/doc/$package/examples");
+ }
+ }