X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/75cbdab57e524075f0ccc51d103bf63beef62109..b21a38ed0b62474b2ca90e8e3656b637de588643:/ikiwiki.in?ds=inline diff --git a/ikiwiki.in b/ikiwiki.in index 339efd37c..1327d70e1 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -8,7 +8,7 @@ use IkiWiki 3.00; sub usage () { die gettext("usage: ikiwiki [options] source dest"), "\n", - gettext(" ikiwiki --setup configfile"), "\n"; + gettext(" ikiwiki --setup my.setup [options]"), "\n"; } sub setup (@) { @@ -108,11 +108,9 @@ sub getconfig () { if (! defined $var || ! defined $val) { die gettext("usage: --set-yaml var=value"), "\n"; } - eval q{use YAML::Any}; - eval q{use YAML} if $@; + eval q{use YAML::XS; use Encode}; die $@ if $@; - eval q{$YAML::Syck::ImplicitUnicode=1}; - $config{$var}=Load($val."\n"); + $config{$var}=Load(encode_utf8($val)."\n"); }, "version" => sub { print "ikiwiki version $IkiWiki::version\n"; @@ -180,6 +178,7 @@ sub main () { $config{srcdir}="" if ! defined $config{srcdir}; $config{destdir}="" if ! defined $config{destdir}; $config{syslog}=1 if $config{setupsyslog}; + checkconfig(); require IkiWiki::Setup; IkiWiki::Setup::dump($config{dumpsetup}); }