]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - ikiwiki.in
fall back from YAML::Any to just YAML
[git.ikiwiki.info.git] / ikiwiki.in
index ae1251ff6b3abe3925c59566709748935b83616a..a8343ed0f99bb1e44b98e7ba4757c48693a45376 100755 (executable)
@@ -65,6 +65,9 @@ sub getconfig () {
                        "exclude=s@" => sub {
                                push @{$config{wiki_file_prune_regexps}}, $_[1];
                        },
+                       "include=s@" => sub {
+                               $config{include}=defined $config{include} && length $config{include} ? "$config{include}|$_[1]" : $_[1];
+                       },
                        "adminuser=s@" => sub {
                                push @{$config{adminuser}}, $_[1]
                        },
@@ -93,6 +96,16 @@ sub getconfig () {
                                }
                                $config{$var}=$val;
                        },
+                       "set-yaml=s" => sub {
+                               my ($var, $val)=split('=', $_[1], 2);
+                               if (! defined $var || ! defined $val) {
+                                       die gettext("usage: --set-yaml var=value"), "\n";
+                               }
+                               eval q{use YAML::Any};
+                               eval q{use YAML} if $@;
+                               die $@ if $@;
+                               $config{$var}=Load($val);
+                       },
                        "version" => sub {
                                print "ikiwiki version $IkiWiki::version\n";
                                exit;