diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-08-06 01:58:04 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-08-06 01:58:04 -0400 |
commit | adc2eb3d8c900a011000431b01ff4b89d5f4f689 (patch) | |
tree | 1a1888f6fd43a7065a9a15abcdf15d7cddaef3db /ikiwiki.in | |
parent | 6fb6d515247b53641c18c286312eb26b58bb9df3 (diff) | |
download | ikiwiki-adc2eb3d8c900a011000431b01ff4b89d5f4f689.tar ikiwiki-adc2eb3d8c900a011000431b01ff4b89d5f4f689.tar.gz |
Options set in the setup file are now immediatly loaded by ikiwiki -setup. This allows later switches to override them. Previously, setup file options overrode most command line options.
Diffstat (limited to 'ikiwiki.in')
-rwxr-xr-x | ikiwiki.in | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/ikiwiki.in b/ikiwiki.in index ddbd71056..e0a657cda 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -19,7 +19,11 @@ sub getconfig () { #{{{ eval q{use Getopt::Long}; Getopt::Long::Configure('pass_through'); GetOptions( - "setup|s=s" => \$config{setup}, + "setup|s=s" => sub { + require IkiWiki::Setup; + IkiWiki::Setup::load($_[1]); + $config{setup}=1; + }, "dumpsetup|s=s" => \$config{dumpsetup}, "wikiname=s" => \$config{wikiname}, "verbose|v!" => \$config{verbose}, @@ -115,9 +119,7 @@ sub main () { #{{{ getconfig(); if ($config{setup}) { - require IkiWiki::Setup; - IkiWiki::Setup::load($config{setup}); - + delete $config{setup}; loadplugins(); checkconfig(); @@ -149,10 +151,6 @@ sub main () { #{{{ if (! $config{refresh}) { $config{rebuild}=1; } - - # ignore syslog setting from setup file - # while doing initial setup - $config{syslog}=0 unless $config{dumpsetup}; } if ($config{dumpsetup}) { |