]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/search.pm
added new plugin: pedigree
[git.ikiwiki.info.git] / IkiWiki / Plugin / search.pm
index 8fc2f3724c9f4666e675aeaa79bc43e839230792..284f477fae5b32f63f9c9159f06c4af84dea2acd 100644 (file)
@@ -194,15 +194,19 @@ sub xapiandb () { #{{{
        return $db;
 } #}}}
 
        return $db;
 } #}}}
 
+{
+my $setup=0;
 sub setupfiles () { #{{{
 sub setupfiles () { #{{{
-       if (! -e $config{wikistatedir}."/xapian" || $config{rebuild}) {
+       if (! $setup and (! -e $config{wikistatedir}."/xapian" || $config{rebuild})) {
                writefile("omega.conf", $config{wikistatedir}."/xapian",
                        "database_dir .\n".
                        "template_dir ./templates\n");
                writefile("query", $config{wikistatedir}."/xapian/templates",
                        IkiWiki::misctemplate(gettext("search"),
                                readfile(IkiWiki::template_file("searchquery.tmpl"))));
                writefile("omega.conf", $config{wikistatedir}."/xapian",
                        "database_dir .\n".
                        "template_dir ./templates\n");
                writefile("query", $config{wikistatedir}."/xapian/templates",
                        IkiWiki::misctemplate(gettext("search"),
                                readfile(IkiWiki::template_file("searchquery.tmpl"))));
+               $setup=1;
        }
 } #}}}
        }
 } #}}}
+}
 
 1
 
 1