allow --dumpsetup to be used w/o specifying srcdir and destdir
shortcut tried to use srcdir in checkconfig; change it to not so this will work.master
parent
4f06e7402a
commit
6a64d13352
|
@ -6,11 +6,11 @@ use strict;
|
||||||
use IkiWiki 2.00;
|
use IkiWiki 2.00;
|
||||||
|
|
||||||
sub import { #{{{
|
sub import { #{{{
|
||||||
hook(type => "checkconfig", id => "shortcut", call => \&checkconfig);
|
hook(type => "refresh", id => "shortcut", call => \&refresh);
|
||||||
hook(type => "preprocess", id => "shortcut", call => \&preprocess_shortcut);
|
hook(type => "preprocess", id => "shortcut", call => \&preprocess_shortcut);
|
||||||
} #}}}
|
} #}}}
|
||||||
|
|
||||||
sub checkconfig () { #{{{
|
sub refresh () { #{{{
|
||||||
# Preprocess the shortcuts page to get all the available shortcuts
|
# Preprocess the shortcuts page to get all the available shortcuts
|
||||||
# defined before other pages are rendered.
|
# defined before other pages are rendered.
|
||||||
my $srcfile=srcfile("shortcuts.mdwn", 1);
|
my $srcfile=srcfile("shortcuts.mdwn", 1);
|
||||||
|
|
12
ikiwiki.in
12
ikiwiki.in
|
@ -88,10 +88,14 @@ sub getconfig () { #{{{
|
||||||
|
|
||||||
if (! $config{setup} && ! $config{render}) {
|
if (! $config{setup} && ! $config{render}) {
|
||||||
loadplugins();
|
loadplugins();
|
||||||
usage() unless @ARGV == 2;
|
if (@ARGV == 2) {
|
||||||
$config{srcdir} = possibly_foolish_untaint(shift @ARGV);
|
$config{srcdir} = possibly_foolish_untaint(shift @ARGV);
|
||||||
$config{destdir} = possibly_foolish_untaint(shift @ARGV);
|
$config{destdir} = possibly_foolish_untaint(shift @ARGV);
|
||||||
checkconfig();
|
checkconfig();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
usage() unless $config{dumpsetup};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue