summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorGabriel McManus <gmcmanus@gmail.com>2008-07-07 02:06:10 +1000
committerJoey Hess <joey@kodama.kitenet.net>2008-07-07 01:53:06 -0400
commit7b8f4d2d062dbc01065b58fde89b9a04aa321fe2 (patch)
tree227bf99eff2f5d0b1d25e06bb6c764c54e6e00c5 /IkiWiki/Plugin
parent2aac9cdb30f1dd6202cca44e505a0e6481e3dd6c (diff)
search: generate configuration files once only when rebuilding
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/search.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm
index 8fc2f3724..7b41bbde9 100644
--- a/IkiWiki/Plugin/search.pm
+++ b/IkiWiki/Plugin/search.pm
@@ -194,14 +194,16 @@ sub xapiandb () { #{{{
return $db;
} #}}}
+my $setup;
sub setupfiles () { #{{{
- if (! -e $config{wikistatedir}."/xapian" || $config{rebuild}) {
+ if (! defined $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;
}
} #}}}