use strict;
use Debian::Debhelper::Dh_Lib;
+use Cwd q{abs_path};
=head1 SYNOPSIS
}
if (@docs) {
- my $exclude = '\\( -type f -or -type l \\)';
+ my $exclude = '';
if ($dh{EXCLUDE_FIND}) {
$exclude .= ' -and ! \( '.$dh{EXCLUDE_FIND}.' \)';
}
next if excludefile($doc);
next if -e $doc && ! -s $doc && ! compat(4); # ignore empty files
if (-d $doc && length $exclude) {
- my ($dir_basename) = basename($doc);
- my $pwd=`pwd`;
- chomp $pwd;
- complex_doit("cd '$doc/..' && find '$dir_basename' $exclude -exec cp --parents -dp {} $pwd/$tmp/usr/share/doc/$package \\;");
+ my ($dir_basename) = basename(abs_path($doc));
+ my $pwd=`pwd`;
+ chomp $pwd;
+ $exclude='\\( -type f -or -type l \\)'.$exclude;
+ complex_doit("cd '$doc/..' && find '$dir_basename' $exclude -exec cp --parents -dp {} $pwd/$tmp/usr/share/doc/$package \\;");
}
else {
doit("cp", "-a", $doc, "$tmp/usr/share/doc/$package");