#!/usr/bin/perl
-$ENV{PATH}="/usr/local/bin:/usr/bin:/bin";
-delete @ENV{qw{IFS CDPATH ENV BASH_ENV}};
-
package IkiWiki;
use warnings;
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";
$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});
}