]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_installdocs
Fix typo in French translation, about debian/package.README.Debian files.
[debhelper.git] / dh_installdocs
index 61b65996e909ef288743e641c1ee7bbfd63fbd76..c20095c0d9f58daaf39f992a278d7932832a1976 100755 (executable)
@@ -90,7 +90,7 @@ Note that dh_installdocs will happily copy entire directory hierarchies if
 you ask it to (similar to cp -a). If it is asked to install a
 directory, it will install the complete contents of the directory.
 
-Note that this command is not idempotent. "dh_clean B<-k>" should be called
+Note that this command is not idempotent. L<dh_prep(1)> should be called
 between invocations of this command. Otherwise, it may cause multiple
 instances of the same text to be added to maintainer scripts.
 
@@ -123,7 +123,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        if (@docs) {
                my $exclude = '';
                if ($dh{EXCLUDE_FIND}) {
-                       $exclude = ' -and ! \( '.$dh{EXCLUDE_FIND}.' \)';
+                       $exclude .= ' -and ! \( '.$dh{EXCLUDE_FIND}.' \)';
                }
                if (! compat(4)) {
                        # ignore empty files in subdirs
@@ -133,13 +133,14 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                        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 \\( -type f -or -type l \\)$exclude -exec cp --parents -dp {} $pwd/$tmp/usr/share/doc/$package \\;");
+                               my $basename = basename($doc);
+                               my $dir = ($basename eq '.') ? $doc : "$doc/..";
+                               my $pwd=`pwd`;
+                               chomp $pwd;
+                               complex_doit("cd '$dir' && find '$basename' \\( -type f -or -type l \\)$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 +206,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;
                        }