diff options
author | kurczews <krzysztof.kurczewski@nokia.com> | 2018-09-19 08:17:52 +0200 |
---|---|---|
committer | kurczews <krzysztof.kurczewski@nokia.com> | 2018-09-19 10:06:18 +0200 |
commit | 7b8621da349c49a111bd6822888ce3df76c1c027 (patch) | |
tree | 027060f0d43584f349776eab3f98e983fd2772bf /deliveries/src/main/scripts/localize.sh | |
parent | e40ad0f69d7e1241dbb0fd17412067353c44eb85 (diff) |
Improve localize scripts
Improve scripts to avoid unecessary WAR repackaging. Tomcat extracts WAR content
when deployed so there is no need to repackage whole WAR (time-costly operation)
in order to update template properties
Issue-ID: VID-164
Change-Id: I2aa2db915ba7408cf9da51a28695c4890c369312
Signed-off-by: kurczews <krzysztof.kurczewski@nokia.com>
Diffstat (limited to 'deliveries/src/main/scripts/localize.sh')
-rwxr-xr-x | deliveries/src/main/scripts/localize.sh | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/deliveries/src/main/scripts/localize.sh b/deliveries/src/main/scripts/localize.sh index 3966f7023..aca557f36 100755 --- a/deliveries/src/main/scripts/localize.sh +++ b/deliveries/src/main/scripts/localize.sh @@ -1,18 +1,23 @@ #!/bin/bash -#Extract the WAR so it can be customized by the localization script -cd /tmp/vid/stage -jar -xf vid.war +fillTemplateProperties() { + source /tmp/vid/localize_war.sh $1 || { + echo "ERROR: Localization script failed" + exit 2 + } +} -source /tmp/vid/localize_war.sh || { - echo "ERROR: Localization script failed" - exit 2 +deployWarOnTomcatManually() { + cd /usr/local/tomcat/webapps/ + mkdir vid + cd vid + jar -xf /tmp/vid/stage/vid.war } -#Create the customized WAR and deploy it to Tomcat -mkdir -p /tmp/vid/deployed -cd /tmp/vid/stage -jar -cvf /tmp/vid/deployed/vid.war . -cd -mv -f /tmp/vid/deployed/vid.war /usr/local/tomcat/webapps +deployWarOnTomcatManually + +TEMPLATES_BASE_DIR=/usr/local/tomcat/webapps/vid/WEB-INF + +fillTemplateProperties ${TEMPLATES_BASE_DIR} + catalina.sh run |