aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Setup
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-01-12 19:04:24 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-01-12 19:04:24 -0500
commit6d785d6401799bf929316cb070471601798de4c0 (patch)
tree9cddd8e1b4a0fb5a7fb48cefb9048b3e4160d0fc /IkiWiki/Setup
parent5b1f7f293dc5fed596f4745398b9c774b725a73b (diff)
downloadikiwiki-6d785d6401799bf929316cb070471601798de4c0.tar
ikiwiki-6d785d6401799bf929316cb070471601798de4c0.tar.gz
Add auto-blog.setup
It will set up an ikiwiki instance tuned for use in blogging. As part of this change, move the example sites into /usr/share/ikiwiki so they are available even if docs are not installed.
Diffstat (limited to 'IkiWiki/Setup')
-rw-r--r--IkiWiki/Setup/Automator.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/IkiWiki/Setup/Automator.pm b/IkiWiki/Setup/Automator.pm
index 9f2380d52..b7798fcec 100644
--- a/IkiWiki/Setup/Automator.pm
+++ b/IkiWiki/Setup/Automator.pm
@@ -73,8 +73,18 @@ sub import (@) {
print "\n\nSetting up $config{wikiname} ...\n";
- # Set up the repository.
+ # Set up the srcdir.
mkpath($config{srcdir}) || die "mkdir $config{srcdir}: $!";
+ # Copy in example wiki.
+ if (exists $config{example}) {
+ # cp -R is POSIX
+ # Another reason not to use -a is so that pages such as blog
+ # posts will not have old creation dates on this new wiki.
+ system("cp -R $IkiWiki::installdir/share/ikiwiki/examples/$config{example}/* $config{srcdir}");
+ delete $config{example};
+ }
+
+ # Set up the repository.
delete $config{repository} if ! $config{rcs} || $config{rcs}=~/bzr|mercurial/;
if ($config{rcs}) {
my @params=($config{rcs}, $config{srcdir});