diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2010-04-16 18:29:45 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2010-04-16 18:30:56 -0400 |
commit | dee2940c0bc97080088c99f399cd0ff0df3bec23 (patch) | |
tree | 0710cd8f4a3d64d1dc22e52911f04954f8d22fa2 /docwiki.setup | |
parent | 0bd6c327666e2ac747183faca483c46ee2774285 (diff) | |
download | ikiwiki-dee2940c0bc97080088c99f399cd0ff0df3bec23.tar ikiwiki-dee2940c0bc97080088c99f399cd0ff0df3bec23.tar.gz |
automatically run --gettime, and optimise it for git
* Automatically run --gettime the first time ikiwiki is run on
a given srcdir.
* Optimise --gettime for git, so it's appropriatly screamingly
fast. (This could be done for other backends too.)
* However, --gettime for git no longer follows renames.
* Use above to fix up timestamps on docwiki, as well as ensure that
timestamps on basewiki files shipped in the deb are sane.
Diffstat (limited to 'docwiki.setup')
-rw-r--r-- | docwiki.setup | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/docwiki.setup b/docwiki.setup index 8278b73ea..6bc200066 100644 --- a/docwiki.setup +++ b/docwiki.setup @@ -1,6 +1,18 @@ #!/usr/bin/perl # Configuration file for ikiwiki to build its documentation wiki. +# Use git during the build, if it's available and if we're building +# from a git checkout. This ensures ikiwiki gets the right mtimes and +# ctimes for files in the doc wiki. +our $rcs="norcs"; +BEGIN { + my $git=`which git 2>&1`; + chomp $git; + if (-x $git && -d ".git") { + $rcs="git"; + } +} + use IkiWiki::Setup::Standard { wikiname => "ikiwiki", srcdir => "doc", @@ -9,7 +21,7 @@ use IkiWiki::Setup::Standard { underlaydirbase => "underlays", underlaydir => "underlays/basewiki", discussion => 0, - exclude => qr/\/discussion|bugs\/*|todo\/*|forum\/*/, + exclude => qr/\/discussion|bugs\/*|todo\/*|forum\/*/, # save space locale => '', verbose => 1, syslog => 0, @@ -17,4 +29,7 @@ use IkiWiki::Setup::Standard { usedirs => 0, prefix_directives => 1, add_plugins => [qw{goodstuff version haiku polygen fortune table}], + disable_plugins => [qw{recentchanges}], # not appropriate for doc dir + rcs => $rcs, + gitorigin_branch => '', # don't pull during build } |