#!/usr/bin/perl -T
$ENV{PATH}="/usr/local/bin:/usr/bin:/bin";
+delete @ENV{qw{IFS CDPATH ENV BASH_ENV}};
package IkiWiki;
use warnings;
"verbose|v!" => \$config{verbose},
"rebuild!" => \$config{rebuild},
"refresh!" => \$config{refresh},
+ "wrappers!" => \$config{wrappers},
"getctime" => \$config{getctime},
"wrappermode=i" => \$config{wrappermode},
"rcs=s" => \$config{rcs},
if (! $config{setup}) {
loadplugins();
- if (exists $hooks{getopt}) {
- foreach my $id (keys %{$hooks{getopt}}) {
- $hooks{getopt}{$id}{call}->();
- }
- }
- if (grep /^-/, @ARGV) {
- print STDERR "Unknown option: $_\n"
- foreach grep /^-/, @ARGV;
- usage();
- }
usage() unless @ARGV == 2;
$config{srcdir} = possibly_foolish_untaint(shift @ARGV);
$config{destdir} = possibly_foolish_untaint(shift @ARGV);