]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_installdocs
releasing version 6.0.0
[debhelper.git] / dh_installdocs
index 61b65996e909ef288743e641c1ee7bbfd63fbd76..e335df74d0b62d5b745db2ae2002c0022b8901be 100755 (executable)
@@ -121,9 +121,9 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        }
 
        if (@docs) {
-               my $exclude = '';
+               my $exclude = '\\( -type f -or -type l \\)';
                if ($dh{EXCLUDE_FIND}) {
-                       $exclude = ' -and ! \( '.$dh{EXCLUDE_FIND}.' \)';
+                       $exclude .= ' -and ! \( '.$dh{EXCLUDE_FIND}.' \)';
                }
                if (! compat(4)) {
                        # ignore empty files in subdirs
@@ -136,10 +136,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                            my ($dir_basename) = basename($doc);
                            my $pwd=`pwd`;
                            chomp $pwd;
-                           complex_doit("cd $doc/.. && find $dir_basename \\( -type f -or -type l \\)$exclude -exec cp --parents -dp {} $pwd/$tmp/usr/share/doc/$package \\;");
+                           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");
+                               doit("cp", "-a", $doc, "$tmp/usr/share/doc/$package");
                        }
                }
                doit("chown","-R","0:0","$tmp/usr/share/doc");
@@ -205,7 +205,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                # Parse the file to get the doc id.
                open (IN, "debian/$fn") || die "Cannot read debian/$fn.";
                while (<IN>) {
-                       if (/^Document:\s+(.*)(\s+)?/) {
+                       if (/^Document:\s+([-+.a-z0-9]+)/) {
                                $doc_ids{$fn}=$1;
                                last;
                        }