diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-03-26 05:08:41 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-03-26 05:08:41 +0000 |
commit | ffc0be87d7eca4de4dbc91d740d36b7b40bfa911 (patch) | |
tree | 123d7568d749906e1896b189866321c9ddf510f1 /IkiWiki/Setup | |
parent | da1f96550e15f6b02156cd0f77df9a6bc6a6b079 (diff) | |
download | ikiwiki-ffc0be87d7eca4de4dbc91d740d36b7b40bfa911.tar ikiwiki-ffc0be87d7eca4de4dbc91d740d36b7b40bfa911.tar.gz |
add --refresh and make it with with --setup
Diffstat (limited to 'IkiWiki/Setup')
-rw-r--r-- | IkiWiki/Setup/Standard.pm | 26 |
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(); |