diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2010-02-28 00:12:47 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2010-02-28 00:12:47 -0500 |
commit | 60d2dd318f66563c3ee3bde950d7f53426530acc (patch) | |
tree | c540152a29cc4112124a6432ef77e9d186e39257 /IkiWiki | |
parent | 70972b16874583bb642b093fb9906a0967d69ac3 (diff) | |
download | ikiwiki-60d2dd318f66563c3ee3bde950d7f53426530acc.tar ikiwiki-60d2dd318f66563c3ee3bde950d7f53426530acc.tar.gz |
Add new --clean option; this makes ikiwiki remove all built files in the destdir, as well as wrappers and the .ikiwiki directory.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Render.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 3ebb1a324..af24df155 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -683,6 +683,17 @@ sub refresh () { } } +sub clean_rendered { + lockwiki(); + loadindex(); + remove_unrendered(); + foreach my $page (keys %oldrenderedfiles) { + foreach my $file (@{$oldrenderedfiles{$page}}) { + prune($config{destdir}."/".$file); + } + } +} + sub commandline_render () { lockwiki(); loadindex(); |