summaryrefslogtreecommitdiff
path: root/dh_installchangelogs
diff options
context:
space:
mode:
Diffstat (limited to 'dh_installchangelogs')
-rwxr-xr-xdh_installchangelogs8
1 files changed, 5 insertions, 3 deletions
diff --git a/dh_installchangelogs b/dh_installchangelogs
index 339313a2..3d7be50d 100755
--- a/dh_installchangelogs
+++ b/dh_installchangelogs
@@ -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 } @files;
+ if (@matches) {
+ $upstream=shift @matches;
last;
}
}