-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathpost-install.xql
25 lines (19 loc) · 1.27 KB
/
post-install.xql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
xquery version "3.0";
import module namespace config="http://www.digital-archiv.at/ns/config" at "modules/config.xqm";
(: grant general execution rights to all scripts in analyze and modules collection :)
for $resource in xmldb:get-child-resources(xs:anyURI($config:app-root||"/analyze/"))
return sm:chmod(xs:anyURI($config:app-root||'/analyze/'||$resource), "rwxrwxr-x"),
for $resource in xmldb:get-child-resources(xs:anyURI($config:app-root||"/modules/"))
return sm:chmod(xs:anyURI($config:app-root||'/modules/'||$resource), "rwxrwxr-x"),
for $resource in xmldb:get-child-resources(xs:anyURI($config:app-root||"/ac/"))
return sm:chmod(xs:anyURI($config:app-root||'/ac/'||$resource), "rwxrwxr-x"),
for $resource in xmldb:get-child-resources(xs:anyURI($config:app-root||"/api/"))
return sm:chmod(xs:anyURI($config:app-root||'/api/'||$resource), "rwxrwxr-x"),
for $resource in xmldb:get-child-resources(xs:anyURI($config:app-root||"/resolver/"))
return sm:chmod(xs:anyURI($config:app-root||'/resolver/'||$resource), "rwxrwxr-x"),
try {
for $resource in xmldb:get-child-resources(xs:anyURI($config:app-root||"/services/"))
return sm:chmod(xs:anyURI($config:app-root||'/services/'||$resource), "rwxrwxr-x")
} catch * {
<error>{$err:code}: {$err:description}</error>
}