Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
fontane-notizbuecher
SADE-Project
Commits
7b71fc46
Commit
7b71fc46
authored
Apr 14, 2020
by
Mathias Goebel
🎠
Browse files
file ingest via pre install script
parent
e424895d
Pipeline
#131101
passed with stages
in 3 minutes and 43 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
post-install.xq
View file @
7b71fc46
...
...
@@ -55,13 +55,14 @@ return
(: error(QName("FONTANE", "INSTALLATION"), "response from tgsearch is not satisfying.") :)
};
(: while working perfectly in eXist 4.7.x, xmldb:move failed silently in eXist 5.2.0
declare variable $moveProject1 := xmldb:copy-collection("/db/apps/fontane/sade-projects", "/db", true());
declare
variable
$
log1
:=
util:log-system-out
(
"moved 1
"
);
declare variable $
removeProject1 := xmldb:remove("/db/apps/fontane/sade-projects
");
declare variable $moveProject2 := xmldb:copy-collection("/db/apps/fontane/system/config/db/sade-projects", "/db/system/config/db", true());
declare
variable
$
log2
:=
util:log-system-out
(
"moved 2"
)
;
declare variable $
removeProject2 := xmldb:remove("/db/apps/fontane/system/config/db/sade-projects"
;
declare variable $moveProject3 := xmldb:move("/db/apps/fontane/system/autostart", "/db/system");
declare
variable
$
log3
:=
util:log-system-out
(
"moved 3
"
);
declare variable $
removeProject3 := xmldb:remove("/db/apps/fontane/system/autostart
");
:)
declare
variable
$preconfigdoc
:=
doc
(
"/db/sade-projects/textgrid/config.xml"
);
declare
variable
$credentials
:=
file:read
(
"/var/lib/textgrid/fontane/credentials.txt"
)
=>
tokenize
(
"\n"
);
...
...
pre-install.xq
0 → 100644
View file @
7b71fc46
xquery
version
"3.1"
;
(: 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
;
let
$fileSeparator
:=
util:system-property
(
"file.separator"
)
return
(
xmldb:create-collection
(
"/db"
,
"sade-projects"
)
,
xmldb:store-files-from-pattern
(
(: target collection :)
"/db/sade-projects"
,
(: source directory :)
$dir
||
$fileSeparator
||
"sade-projects"
,
(: What to ingest :)
"**/*"
,
(: MIME type :)
()
,
(: preserve structure :)
true
()
)
,
file:delete
(
$dir
||
$fileSeparator
||
"sade-projects"
)
,
xmldb:store-files-from-pattern
(
(: target collection :)
"/db/system"
,
(: source directory :)
$dir
||
$fileSeparator
||
"system"
,
(: What to ingest :)
"**/*"
,
(: MIME type :)
()
,
(: preserve structure :)
true
()
)
,
file:delete
(
$dir
||
$fileSeparator
||
"system"
)
,
util:log-system-out
(
"fontane: pre-install finished"
)
)
\ No newline at end of file
repo.xml
View file @
7b71fc46
...
...
@@ -10,7 +10,7 @@
<copyright>
true
</copyright>
<type>
application
</type>
<target>
fontane
</target>
<prepare
/
>
<prepare
>
pre-insall.xq
</prepare
>
<finish>
post-install.xq
</finish>
<deployed>
@timestamp@
</deployed>
</meta>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment