-if (grep /^-/, @ARGV) {
- eval {use Getopt::Long};
- GetOptions(
- "wikiname=s" => \$config{wikiname},
- "verbose|v!" => \$config{verbose},
- "rebuild!" => \$config{rebuild},
- "wrapper!" => \$config{wrapper},
- "svn!" => \$config{svn},
- "anonok!" => \$config{anonok},
- "cgi!" => \$config{cgi},
- "url=s" => \$config{url},
- "cgiurl=s" => \$config{cgiurl},
- "historyurl=s" => \$config{historyurl},
- "exclude=s@" => sub {
- $config{wiki_file_prune_regexp}=qr/$config{wiki_file_prune_regexp}|$_[1]/;
- },
- ) || usage();
-}
-usage() unless @ARGV == 3;
-$config{srcdir} = possibly_foolish_untaint(shift);
-$config{templatedir} = possibly_foolish_untaint(shift);
-$config{destdir} = possibly_foolish_untaint(shift);
-
-if ($config{cgi} && ! length $config{url}) {
- error("Must specify url to wiki with --url when using --cgi");
-}
-