X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/5807f1de04aa7d3910e7f694e0d1e5613d8f5b41..f32369f66924e0c008370c29462af57fd218267a:/IkiWiki/Plugin/search.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index 8fc2f3724..284f477fa 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -194,15 +194,19 @@ sub xapiandb () { #{{{ return $db; } #}}} +{ +my $setup=0; 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")))); + $setup=1; } } #}}} +} 1