summaryrefslogtreecommitdiff
path: root/IkiWiki/Setup
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-26 05:08:41 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-26 05:08:41 +0000
commitffc0be87d7eca4de4dbc91d740d36b7b40bfa911 (patch)
tree123d7568d749906e1896b189866321c9ddf510f1 /IkiWiki/Setup
parentda1f96550e15f6b02156cd0f77df9a6bc6a6b079 (diff)
add --refresh and make it with with --setup
Diffstat (limited to 'IkiWiki/Setup')
-rw-r--r--IkiWiki/Setup/Standard.pm26
1 files changed, 16 insertions, 10 deletions
diff --git a/IkiWiki/Setup/Standard.pm b/IkiWiki/Setup/Standard.pm
index c5a67afdf..b26df006b 100644
--- a/IkiWiki/Setup/Standard.pm
+++ b/IkiWiki/Setup/Standard.pm
@@ -20,21 +20,27 @@ package IkiWiki;
sub setup_standard {
my %setup=%{$_[1]};
- debug("generating wrappers..");
- my %startconfig=(%config);
- foreach my $wrapper (@{$setup{wrappers}}) {
- %config=(%startconfig, verbose => 0, %setup, %{$wrapper});
- checkconfig();
- gen_wrapper();
+ if (! $config{refresh}) {
+ debug("generating wrappers..");
+ my %startconfig=(%config);
+ foreach my $wrapper (@{$setup{wrappers}}) {
+ %config=(%startconfig, verbose => 0, %setup, %{$wrapper});
+ checkconfig();
+ gen_wrapper();
+ }
+ %config=(%startconfig);
}
- %config=(%startconfig);
-
- debug("rebuilding wiki..");
foreach my $c (keys %setup) {
$config{$c}=possibly_foolish_untaint($setup{$c})
if defined $setup{$c} && ! ref $setup{$c};
}
- $config{rebuild}=1;
+ if (! $config{refresh}) {
+ $config{rebuild}=1;
+ debug("rebuilding wiki..");
+ }
+ else {
+ debug("refreshing wiki..");
+ }
checkconfig();
lockwiki();