- my @files=sort glob("*");
- foreach my $name (qw{changelog changes changelog.txt changes.txt history history.txt}) {
- my @matches=grep {
- lc $_ eq $name && -s $_ && ! excludefile($_)
- } @files;
- if (@matches) {
- $upstream=shift @matches;
- last;
+ foreach my $dir (qw{. doc docs}) {
+ my @files=sort glob("$dir/*");
+ foreach my $name (qw{changelog changes changelog.txt changes.txt history history.txt}) {
+ my @matches=grep {
+ lc basename($_) eq $name && -s $_ && ! excludefile($_)
+ } @files;
+ if (@matches) {
+ $upstream=shift @matches;
+ last;
+ }