X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/cba6935f55f95b99a177d2cbe9130d6d589e10a8..64d9729601c01d81dd54d698c645c2dedf84bb02:/ikiwiki.in?ds=sidebyside diff --git a/ikiwiki.in b/ikiwiki.in index bcda2469b..1327d70e1 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -1,7 +1,4 @@ #!/usr/bin/perl -$ENV{PATH}="/usr/local/bin:/usr/bin:/bin"; -delete @ENV{qw{IFS CDPATH ENV BASH_ENV}}; - package IkiWiki; use warnings; @@ -11,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 (@) { @@ -111,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"; @@ -183,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}); }