]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_installchangelogs
Fix typo in French translation, about debian/package.README.Debian files.
[debhelper.git] / dh_installchangelogs
index 339313a25a92bf36a41007c1adad1d0f46e73b0d..7042c5f9b742d270e7b13f67b123aaf84c1e4bb0 100755 (executable)
@@ -31,7 +31,7 @@ usr/share/doc/package/NEWS.Debian. debian/package.NEWS files can also be
 used.
 
 An upstream changelog file may be specified as an option. If none is
-specified, a few common filenames are tried. (In compatability level 7 and
+specified, a few common filenames are tried. (In compatibility level 7 and
 above.)
 
 If there is an upstream changelog file, it will be be installed as
@@ -67,9 +67,11 @@ my $upstream=shift;
 my $changelog_name="changelog.Debian";
 if (! defined $upstream) {
        if (! isnative($dh{MAINPACKAGE}) && !compat(6)) {
-               foreach my $name (qw{ChangeLog Changelog Changes CHANGES changelog}) {
-                       if (-e $name) {
-                               $upstream=$name;
+               my @files=sort glob("*");
+               foreach my $name (qw{changelog changes}) {
+                       my @matches=grep { lc $_ eq $name && -s $_ } @files;
+                       if (@matches) {
+                               $upstream=shift @matches;
                                last;
                        }
                }