diff options
author | intrigeri <intrigeri@boum.org> | 2009-01-15 20:04:31 +0100 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2009-01-15 20:04:31 +0100 |
commit | e6992480e2e0cf965650f84aa97e01fe0fa71544 (patch) | |
tree | b4c1743a8f99d22788e190b46f5cb1c09b9b50bb /IkiWiki/Setup/Automator.pm | |
parent | 48de7f9c7b387ca9f21294b47efc58e7dd64c6ad (diff) | |
parent | 63fe022602b622eb80bd38d64ee272b543ce0418 (diff) |
Merge commit 'upstream/master' into prv/po
Conflicts:
debian/control
Diffstat (limited to 'IkiWiki/Setup/Automator.pm')
-rw-r--r-- | IkiWiki/Setup/Automator.pm | 12 |
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}); |