summaryrefslogtreecommitdiff
path: root/ikiwiki
diff options
context:
space:
mode:
Diffstat (limited to 'ikiwiki')
-rwxr-xr-xikiwiki24
1 files changed, 21 insertions, 3 deletions
diff --git a/ikiwiki b/ikiwiki
index c2d5e6475..08d1c4f81 100755
--- a/ikiwiki
+++ b/ikiwiki
@@ -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