aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Setup
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-27 16:01:29 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-27 16:01:29 -0400
commit950850f63911d7f54f23e0699f820369b32a3532 (patch)
tree53bf35f9b6545faad2ccf9aad49b35ddfedfadc2 /IkiWiki/Setup
parent929a70a16d898051f37ee497f275a894d6fc1362 (diff)
downloadikiwiki-950850f63911d7f54f23e0699f820369b32a3532.tar
ikiwiki-950850f63911d7f54f23e0699f820369b32a3532.tar.gz
add new wiki to wikilist
Diffstat (limited to 'IkiWiki/Setup')
-rw-r--r--IkiWiki/Setup/Automator.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/IkiWiki/Setup/Automator.pm b/IkiWiki/Setup/Automator.pm
index 202c5541c..b5cf8fb48 100644
--- a/IkiWiki/Setup/Automator.pm
+++ b/IkiWiki/Setup/Automator.pm
@@ -110,6 +110,17 @@ sub import (@) { #{{{
die "ikiwiki --wrappers --setup $config{dumpsetup} failed";
}
+ # Add it to the wikiwiki.
+ mkpath("$ENV{HOME}/.ikiwiki");
+ open (WIKILIST, ">>$ENV{HOME}/.ikiwiki/wikilist") || die "$ENV{HOME}/.ikiwiki/wikilist: $!";
+ print WIKILIST "$ENV{USER} $config{dumpsetup}\n";
+ close WIKILIST;
+ if (system("ikiwiki-update-wikilist") != 0) {
+ print STDERR "** Failed to add you to the system wikilist file.\n";
+ print STDERR "** (Probably ikiwiki-update-wikilist is not SUID root.)\n";
+ print STDERR "** Your wiki will not be automatically updated when ikiwiki is upgraded.\n";
+ }
+
# Done!
print "\n\nSuccessfully set up $config{wikiname}:\n";
foreach my $key (qw{url srcdir destdir repository}) {