aboutsummaryrefslogtreecommitdiff
path: root/ikiwiki.in
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-26 23:00:44 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-26 23:00:44 -0400
commit6a64d133526b25b46828bc75c2b3b99c0ab7e331 (patch)
treec55561d25abd8b24c4fec42fed1c99ac861ae629 /ikiwiki.in
parent4f06e7402ab09ebc1baa2ff0b3af50ccfc37a67e (diff)
downloadikiwiki-6a64d133526b25b46828bc75c2b3b99c0ab7e331.tar
ikiwiki-6a64d133526b25b46828bc75c2b3b99c0ab7e331.tar.gz
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.
Diffstat (limited to 'ikiwiki.in')
-rwxr-xr-xikiwiki.in12
1 files changed, 8 insertions, 4 deletions
diff --git a/ikiwiki.in b/ikiwiki.in
index febc8ff56..0390df7e1 100755
--- a/ikiwiki.in
+++ b/ikiwiki.in
@@ -88,10 +88,14 @@ sub getconfig () { #{{{
if (! $config{setup} && ! $config{render}) {
loadplugins();
- usage() unless @ARGV == 2;
- $config{srcdir} = possibly_foolish_untaint(shift @ARGV);
- $config{destdir} = possibly_foolish_untaint(shift @ARGV);
- checkconfig();
+ if (@ARGV == 2) {
+ $config{srcdir} = possibly_foolish_untaint(shift @ARGV);
+ $config{destdir} = possibly_foolish_untaint(shift @ARGV);
+ checkconfig();
+ }
+ else {
+ usage() unless $config{dumpsetup};
+ }
}
}
else {