]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - ikiwiki.in
update for rename of recentchanges.mdwn to json.tl.ph.mdwn
[git.ikiwiki.info.git] / ikiwiki.in
index adff1411e8aa715a192f3850a7aef59f4cd04f0b..30df628b27d9fda67fbf69ecf17d8ae857edb4f8 100755 (executable)
@@ -1,14 +1,15 @@
 #!/usr/bin/perl
 package IkiWiki;
 
 #!/usr/bin/perl
 package IkiWiki;
 
+no lib '.';
 use warnings;
 use strict;
 use warnings;
 use strict;
-use lib '.'; # For use in nonstandard directory, munged by Makefile.
+use FindBin; use lib $FindBin::Bin; # For use in nonstandard directory, munged by Makefile.
 use IkiWiki 3.00;
 
 sub usage () {
        die gettext("usage: ikiwiki [options] source dest"), "\n",
 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 (@) {
 }
 
 sub setup (@) {
@@ -108,11 +109,9 @@ sub getconfig () {
                                if (! defined $var || ! defined $val) {
                                        die gettext("usage: --set-yaml var=value"), "\n";
                                }
                                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 $@;
                                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";
                        },
                        "version" => sub {
                                print "ikiwiki version $IkiWiki::version\n";