X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/5c6c0813ca8dff8c42ac32ed9702568228f8407b..d4c7df992e4bac39b68a637cf541c351dce845f9:/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}); }