-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost-install.xql
32 lines (23 loc) · 1.15 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
26
27
28
29
30
31
32
xquery version "1.0";
import module namespace xdb="http://exist-db.org/xquery/xmldb";
(: 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;
(: fix permission of cache so everybody can get their requests cached :)
let $op := sm:chmod( xs:anyURI(concat($target,"/data/eso-cache.xml")), "rw-rw-rw-")
let $op := sm:chmod( xs:anyURI(concat($target,"/data/ads-cache.xml")), "rw-rw-rw-")
(: adsabs module stores xml in cache :)
let $op := xmldb:create-collection("/", "ads")
let $op := xmldb:create-collection("/ads", "records")
let $op := sm:chmod( xs:anyURI("/ads/records"), "rwxrwxrwx")
(:
let $install := repo:install-and-deploy("http://expath.org/ns/ft-client", "1.2.0", "http://demo.exist-db.org/exist/apps/public-repo/modules/find.xql")
TODO:
- copy data/collection.xconf into /db/ads so we index bibcode elements
- apply xmldb:reindex on /db/ads
:)
return true()