diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-03-10 04:28:06 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-03-10 04:28:06 +0000 |
commit | 198c2d9c45cb974aabf999797bdb7d6ab8636b2c (patch) | |
tree | dd27cd37b4bef9ef7d22acd9f2c04ea31e62cdd1 /ikiwiki | |
parent | 2877f698959f410889f358409eff019be0863331 (diff) |
options
Diffstat (limited to 'ikiwiki')
-rwxr-xr-x | ikiwiki | 24 |
1 files changed, 21 insertions, 3 deletions
@@ -14,11 +14,25 @@ BEGIN { memoize('pagename'); memoize('bestlink'); -my ($srcdir)= shift =~ /(.*)/; # untaint -my ($destdir)= shift =~ /(.*)/; # untaint +sub usage { + die "usage: ikiwiki [options] source dest\n"; +} + my $link=qr/\[\[([^\s]+)\]\]/; -my $verbose=1; +my $verbose=0; +my $rebuild=0; my $wikiname="wiki"; +if (grep /^-/, @ARGV) { + eval {use Getopt::Long}; + GetOptions( + "wikiname=s" => \$wikiname, + "verbose|v" => \$verbose, + "rebuild" => \$rebuild, + ) || usage(); +} +usage() unless @ARGV == 2; +my ($srcdir) = shift =~ /(.*)/; # untaint +my ($destdir) = shift =~ /(.*)/; # untaint my %links; my %oldpagemtime; @@ -331,6 +345,10 @@ sub refresh () { debug("rendering changed file $file"); render($file); } + elsif ($rebuild) { + debug("rebuilding unchanged file $file"); + render($file); + } } # if any files were added or removed, check to see if each page |