Blame view

SOURCES/CDPP-V2_14/tools/mkwng3dviewtar.sh 3.26 KB
6d50c909   Myriam Bouchemit   sources de la V2.14
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/bin/bash
# build a 2 zip for editorial(www.tar.gz) and conf packages for webNG
# param : 1 : version number (i.e. 2_2)
#
# to be prepared before launching script:
# 1 - compile with mkproj.sh
# 2 - ROOT.war in server/web
#
# Mappings:
# conf
# server/web/native/exe/bin -> scripts/web
# server/dpc/bin/linux -> scripts/dpc/exe
# server/dpc/scripts -> scripts/dpc
# server/dpc/lib -> scripts/dpc/lib
# server/dpc/dist -> scripts/dpc/lib
# server/dpc/conf -> scripts/dpc/conf
# server/web/conf -> data/web/conf
#
#
# www.tar.gz
# <TBD> -> www/tomcat/webapps
#



if [ ! $# -eq 1 ]
then
  echo " Usage : $0 [version] "
  exit 1
else
  version=$1
fi


################### replace variables with specific webNG values ###########################
#if [ ! "$genmode" = "web" ]
#then
#	sed "s/SONC_ORBITO_PATH/$SONC_ORBITO_PATH/g" ./SONC/SONC_DPC/orbit_files/kernels.txt  > ./SONC/SONC_DPC/orbit_files/kernels.txt2
#	mv ./SONC/SONC_DPC/orbit_files/kernels.txt2 ./SONC/SONC_DPC/orbit_files/kernels.txt
#fi


if [ -f W3-3DVIEW-DATA-V${version}.zip.old ]
then 
	\rm -rf W3-3DVIEW-DATA-V${version}.zip.old
	\rm -rf W3-3DVIEW-CONF-V${version}.zip.old
fi
if [ -f W3-3DVIEW-DATA-V${version}.zip ]
then 
	mv W3-3DVIEW-DATA-V${version}.zip W3-3DVIEW-DATA-V${version}.zip.old
	mv W3-3DVIEW-CONF-V${version}.zip W3-3DVIEW-CONF-V${version}.zip.old
fi

	echo "****************************************"
	echo "*                                      *"
	echo "*    WEBNG 3DVIEW PKG GENERATION       *"
	echo "*                                      *"
	echo "****************************************"
	echo "*** Build webng app package ***"
	mkdir -p tomcat/webapps/ROOT
	mkdir -p www
	mkdir -p data/web
	mkdir -p data/dpc
	cp -r ../server/web/conf data/web
	cp -r ../server/dpc/conf data/dpc
	cd tomcat/webapps/ROOT
	jar xf ../../../../server/web/ROOT.war
	#set specfic webngfiles
	mv WEB-INF/classes/bodies.properties.webng WEB-INF/classes/bodies.properties
	mv WEB-INF/classes/conf.properties.webng WEB-INF/classes/conf.properties
	mv WEB-INF/classes/services.properties.webng WEB-INF/classes/services.properties
	cd ../../..
	tar cvf - www data tomcat|gzip -c >www.tar.gz
	zip W3-3DVIEW-DATA-V${version}.zip www.tar.gz
	md5sum W3-3DVIEW-DATA-V${version}.zip > md5sum-W3-3DVIEW-DATA-V${version}.txt
	\rm -f www.tar.gz

	#Prepare prod conf and preprod conf
	mkdir -p scripts/dpc
	mkdir -p scripts/dpc/exe
	mkdir -p scripts/web
	cp -r ../server/dpc/scripts scripts/dpc
	cp -r ../server/dpc/lib scripts/dpc
	cp -r ../server/dpc/dist scripts/dpc
	cp ../server/dpc/bin/linux/* scripts/dpc/exe
	cp -r ../server/web/native/exe/bin scripts/web
	cp -r ../server/web/native/exe/models scripts/web
	#cp -r ../server/web/native/exe/dir.ionotool scripts/web

	#zip -r $install_dir/w3sonc-conf-pp-v${version}.zip apache.conf dynamic.dirs php.ini postinstall.sh save.dirs
	#cp apacheprod.conf apache.conf
	zip -r W3-3DVIEW-CONF-V${version}.zip scripts
	cd webng
	zip -ur ../W3-3DVIEW-CONF-V${version}.zip dynamic.dirs apache.conf postinstall.sh save.dirs catalina.policy java.opts tomcat-libs
	#cd $install_dir
	cd ..
	md5sum  W3-3DVIEW-CONF-V${version}.zip > md5sum-W3-3DVIEW-CONF-V${version}.txt
	#md5sum w3sonc-conf-prod-v${version}.zip > md5sum-w3sonc-conf-prod-v${version}.txt
	echo "Removing temporary installation files ..."
	\rm -rf tomcat www data scripts