]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Rcs/tla.pm
wrapper setup reorg
[git.ikiwiki.info.git] / IkiWiki / Rcs / tla.pm
index 4232e1fe8372429902b7438f20e6c0c25189ce52..53c198032424a8a826c0dba5d8edd9b667d27633 100644 (file)
@@ -6,6 +6,50 @@ use warnings;
 use strict;
 use IkiWiki;
 
+hook(type => "checkconfig", id => "tla", call => sub { #{{{
+       if (! defined $config{diffurl}) {
+               $config{diffurl}="";
+       }
+       if (exists $config{tla_wrapper}) {
+               push @{$config{wrappers}}, {
+                       wrapper => $config{tla_wrapper},
+                       wrappermode => (defined $config{tla_wrappermode} ? $config{tla_wrappermode} : "06755"),
+               };
+       }
+}); #}}}
+
+hook(type => "getsetup", id => "tla", call => sub { #{{{
+       return
+               tla_wrapper => {
+                       type => "string",
+                       #example => "", # TODO example
+                       description => "tla post-commit executable to generate",
+                       safe => 0, # file
+                       rebuild => 0,
+               },
+               tla_wrappermode => {
+                       type => "string",
+                       example => '06755',
+                       description => "mode for tla_wrapper (can safely be made suid)",
+                       safe => 0,
+                       rebuild => 0,
+               },
+               historyurl => {
+                       type => "string",
+                       #example => "", # TODO example
+                       description => "url to show file history ([[file]] substituted)",
+                       safe => 1,
+                       rebuild => 1,
+               },
+               diffurl => {
+                       type => "string",
+                       #example => "", # TODO example
+                       description => "url to show a diff ([[file]] and [[rev]] substituted)",
+                       safe => 1,
+                       rebuild => 1,
+               },
+}); #}}}
+
 sub quiet_system (@) {
        # See Debian bug #385939.
        open (SAVEOUT, ">&STDOUT");