-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaddbinarymodule.sh
53 lines (40 loc) · 1.97 KB
/
addbinarymodule.sh
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
DSPACE_SRC="/home/richard/Code/External/Duo-Dev/DSpace-42-Scratch"
MAVEN="mvn"
VERSION="3.1.0"
# copy everything except the readme and the dspace.cfg extension
shopt -s extglob
cd config
cp -r !(dspace.cfg|README.md) $DSPACE_SRC/dspace/config
cd ..
# NOTE: the following lines are all superseded by the above line, and could be removed in the long run ...
# copy the relevant contents of the root config file
#cp config/input-forms.xml $DSPACE_SRC/dspace/config
#cp config/workflow.xml $DSPACE_SRC/dspace/config
#cp config/xmlui.xconf $DSPACE_SRC/dspace/config
# copy the crosswalks
#cp config/crosswalks/* $DSPACE_SRC/dspace/config/crosswalks/
# copy the module configuration
#cp config/modules/* $DSPACE_SRC/dspace/config/modules/
# copy the registries
#cp config/registries/* $DSPACE_SRC/dspace/config/registries
# copy the emails
#cp config/emails/* $DSPACE_SRC/dspace/config/emails
# copy the spring configuration for workflows
#cp config/spring/api/* $DSPACE_SRC/dspace/config/spring/api/
#cp config/spring/xmlui/* $DSPACE_SRC/dspace/config/spring/xmlui/
# copy the customised messages file
mkdir -p $DSPACE_SRC/dspace/modules/xmlui/src/main/webapp/i18n/
cp deploy/messages.xml $DSPACE_SRC/dspace/modules/xmlui/src/main/webapp/i18n/
# copy the javascript for the workflow
mkdir -p $DSPACE_SRC/dspace/modules/xmlui/src/main/webapp/static/js/
cp deploy/bitstream-reorder-workflow.js $DSPACE_SRC/dspace/modules/xmlui/src/main/webapp/static/js/
# install the module
$MAVEN install:install-file -Dfile=duo-$VERSION.jar -DpomFile=pom.xml
# send the poms over to incorporate the dependency
# this one makes sure that the dependency ends up in the DSpace lib directory
mv $DSPACE_SRC/dspace/pom.xml $DSPACE_SRC/dspace/original.pom.xml
cp deploy/dspace.pom.xml $DSPACE_SRC/dspace/pom.xml
# this one makes sure it is available in the webapps (I think!)
mv $DSPACE_SRC/dspace/modules/pom.xml $DSPACE_SRC/dspace/modules/original.pom.xml
cp deploy/modules.pom.xml $DSPACE_SRC/dspace/modules/pom.xml