post-install.xq 631 Bytes
Newer Older
1
xquery version "3.1";
Mathias Goebel's avatar
?    
Mathias Goebel committed
2
(
3
exrest:register-module(xs:anyURI("/db/apps/SADE/modules/fontane/index-api.xqm")),
Mathias Goebel's avatar
Mathias Goebel committed
4
exrest:register-module(xs:anyURI("/db/apps/SADE/modules/fontane/toc-api.xqm")),
Mathias Goebel's avatar
Mathias Goebel committed
5
(let $doc := doc("expath-pkg.xml")//*:package,
Mathias Goebel's avatar
Mathias Goebel committed
6
7
    $app := string($doc/@abbrev),
    $version := string($doc/@version),
Mathias Goebel's avatar
Mathias Goebel committed
8
    $filename := string-join(("/tmp/tests", $app, $version), "-") || ".xml",
Mathias Goebel's avatar
Mathias Goebel committed
9
10
    $node :=
      <tests application="{$app}" version="{$version}">
Mathias Goebel's avatar
Mathias Goebel committed
11
        {util:eval(xs:anyURI("/db/apps/SADE/modules/fontane/tests.xq"))}
Mathias Goebel's avatar
Mathias Goebel committed
12
      </tests>,
Mathias Goebel's avatar
Mathias Goebel committed
13
14
15
    $sysout := util:log-system-out($node)
return file:serialize($node, $filename, ())
)
Mathias Goebel's avatar
?    
Mathias Goebel committed
16
)