-
Notifications
You must be signed in to change notification settings - Fork 2
/
post-install.xql
23 lines (18 loc) · 999 Bytes
/
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
xquery version "3.1";
import module namespace edweb="http://www.bbaw.de/telota/software/ediarum/web/lib";
import module namespace dbutil="http://exist-db.org/xquery/dbutil" at "modules/dbutil.xqm";
declare namespace sm="http://exist-db.org/xquery/securitymanager";
declare namespace appconf="http://www.bbaw.de/telota/software/ediarum/web/appconf";
(: The following external variables are set by the repo:deploy function :)
(: file path pointing to the exist installation directory :)
declare variable $home external;
(: path to the directory containing the unpacked .xar package :)
declare variable $dir external;
(: the target collection into which the app is deployed :)
declare variable $target external;
if (doc("appconf.xml")//appconf:project/appconf:status/string()="test") then
sm:chmod(xs:anyURI($target||"/modules/view.xql"), "rwxr-sr-x")
else (
sm:chgrp(xs:anyURI($target||"/modules/view.xql"), "website"),
sm:chmod(xs:anyURI($target||"/modules/view.xql"), "rwsr-x---")
)