X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/b073359b18be7940d5138037a6423b8c45bfa39f..b277e00d4ec2dc3b50a111957b7fbd0c5ac7bbd9:/IkiWiki/Setup/Standard.pm diff --git a/IkiWiki/Setup/Standard.pm b/IkiWiki/Setup/Standard.pm index 22bfc38a4..b8ad09144 100644 --- a/IkiWiki/Setup/Standard.pm +++ b/IkiWiki/Setup/Standard.pm @@ -71,7 +71,8 @@ sub dumpvalues ($@) { #{{{ return @ret; } #}}} -sub gendump () { #{{{ +sub gendump ($) { #{{{ + my $description=shift; my %setup=(%config); my @ret; @@ -79,23 +80,31 @@ sub gendump () { #{{{ push @ret, dumpvalues(\%setup, IkiWiki::getsetup()); push @ret, ""; + # sort rcs plugin first + my @plugins=sort { + ($a eq $config{rcs}) <=> ($b eq $config{rcs}) + || + $a cmp $b + } keys %{$IkiWiki::hooks{getsetup}}; + foreach my $id (sort keys %{$IkiWiki::hooks{getsetup}}) { # use an array rather than a hash, to preserve order my @s=$IkiWiki::hooks{getsetup}{$id}{call}->(); return unless @s; - push @ret, "\t# $id plugin"; + push @ret, "\t# $id".($id ne $config{rcs} ? " plugin" : ""); push @ret, dumpvalues(\%setup, @s); push @ret, ""; } - unshift @ret, "#!/usr/bin/perl -# Setup file for ikiwiki. -# Passing this to ikiwiki --setup will make ikiwiki generate wrappers and -# build the wiki. -# -# Remember to re-run ikiwiki --setup any time you edit this file. - -use IkiWiki::Setup::Standard {"; + unshift @ret, + "#!/usr/bin/perl", + "# $description", + "#", + "# Passing this to ikiwiki --setup will make ikiwiki generate", + "# wrappers and build the wiki.", + "#", + "# Remember to re-run ikiwiki --setup any time you edit this file.", + "use IkiWiki::Setup::Standard {"; push @ret, "}"; return @ret;