mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-05 14:15:32 +00:00
wikiheaders: Sort pages before listing them in README/FrontPage.md.
(cherry picked from commit 99c38268cd1325bb64739217adbeebaae7ae6a84)
This commit is contained in:
parent
8572e19327
commit
0a0dfdb2f9
|
@ -1387,19 +1387,24 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||||
}
|
}
|
||||||
closedir(DH);
|
closedir(DH);
|
||||||
|
|
||||||
open(FH, '>', "$wikireadmepath/FrontPage.md") or die("Can't open '$wikireadmepath/FrontPage.md': $!\n");
|
my @pages = ();
|
||||||
print FH "# All READMEs available here\n\n";
|
|
||||||
|
|
||||||
opendir(DH, $wikireadmepath) or die("Can't opendir '$wikireadmepath': $!\n");
|
opendir(DH, $wikireadmepath) or die("Can't opendir '$wikireadmepath': $!\n");
|
||||||
while (readdir(DH)) {
|
while (readdir(DH)) {
|
||||||
my $dent = $_;
|
my $dent = $_;
|
||||||
if ($dent =~ /\A(.*?)\.(mediawiki|md)\Z/) {
|
if ($dent =~ /\A(.*?)\.(mediawiki|md)\Z/) {
|
||||||
my $wikiname = $1;
|
my $wikiname = $1;
|
||||||
next if $wikiname eq 'FrontPage';
|
next if $wikiname eq 'FrontPage';
|
||||||
print FH "- [$wikiname]($wikiname)\n";
|
push @pages, $wikiname;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir(DH);
|
closedir(DH);
|
||||||
|
|
||||||
|
open(FH, '>', "$wikireadmepath/FrontPage.md") or die("Can't open '$wikireadmepath/FrontPage.md': $!\n");
|
||||||
|
print FH "# All READMEs available here\n\n";
|
||||||
|
foreach (sort @pages) {
|
||||||
|
my $wikiname = $_;
|
||||||
|
print FH "- [$wikiname]($wikiname)\n";
|
||||||
|
}
|
||||||
close(FH);
|
close(FH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue