-
Notifications
You must be signed in to change notification settings - Fork 3
/
assemble
executable file
·41 lines (27 loc) · 1.29 KB
/
assemble
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
#!/bin/bash -e
function restore_saved_artifacts() {
if [ "$(ls -A /tmp/artifacts/ 2>/dev/null)" ]; then
echo "Restoring saved artifacts from prior build..."
mv /tmp/artifacts/.[!.]* $HOME/.
fi
}
# Source code provided to S2I is at ${HOME}
if [[ "$1" == "-h" ]]; then
exec /usr/libexec/s2i/usage
fi
LOCAL_SOURCE_DIR=/tmp/src
DEPLOY_DIR=$CATALINA_HOME/webapps/
restore_saved_artifacts
pushd $LOCAL_SOURCE_DIR &> /dev/null
cp -r resources/xml/ $HOME/.meditor/
SMARTGWT_LATEST_BUILD=`curl -s http://www.smartclient.com/builds/SmartGWT/6.0p/LGPL 2>&1 | xmlstarlet sel -t -c "//html/body/pre[2]/a[1]/text()"`
mvn com.isomorphic:isc-maven-plugin:install -Dproduct=SMARTGWT -Dlicense=LGPL -DbuildNumber=6.0p -DbuildDate=$SMARTGWT_LATEST_BUILD
mvn clean install --batch-mode -DskipTests
mv ./target/meditor.war $DEPLOY_DIR
unzip -o resources/djatoka/dist/djatoka.war -d $CATALINA_HOME/webapps/djatoka
cp resources/djatoka/bin/log4j.properties $CATALINA_HOME/webapps/djatoka/WEB-INF/classes/log4j.properties
cp resources/djatoka/dist/djatoka.properties $CATALINA_HOME/webapps/djatoka/WEB-INF/classes/djatoka.properties
chmod -R go+w $CATALINA_HOME/webapps/djatoka/WEB-INF/classes
mv resources/djatoka/ $HOME/.meditor/
mv $HOME/lib/libyaz4j.so $LD_LIBRARY_PATH/
mv resources/convertAudio/ $HOME/.meditor/