blob: fbc53513c131c3f9197059ad3f4511372800ba9b [file] [log] [blame]
david_williamsed5201c2007-05-27 05:48:38 +00001
david_williams30fcdae2006-08-16 07:11:21 +00002#set variables
david_williamsed5201c2007-05-27 05:48:38 +00003
4
david_williams66bb9362007-05-27 02:25:50 +00005updateSiteFile=${1}
6updateSite=${2}
david_williams264285e2007-02-10 02:22:04 +00007
david_williamsed5201c2007-05-27 05:48:38 +00008source properties.shsource
david_williams264285e2007-02-10 02:22:04 +00009
david_williams47f61222007-02-10 18:50:15 +000010# save away a clean version of this site file, produced during mirroring commands,
11# with all the latest version numbers
david_williams66bb9362007-05-27 02:25:50 +000012mv ${updateSite}/site.xml ${updateSite}/.site.xml
david_williams8a62f0d2006-06-28 05:07:27 +000013
david_williams91f39022009-02-07 21:57:00 +000014if [ "$?" -ne "0" ]
15then
16 exit $?
17fi
david_williams8a62f0d2006-06-28 05:07:27 +000018
19# merge authored site.xml with the autogenerated one
david_williams8a62f0d2006-06-28 05:07:27 +000020
david_williamsed5201c2007-05-27 05:48:38 +000021in_authored=${HOME}/${updateToolsDir}/WebContent/${updateSiteFile}
22# remember, this 'site.xml' is just the output of mirror command, when ran in context
23in_newFeatures=${updateSite}/.site.xml
24
25# merges newFeautes in to authored, back in original locaion
26java -jar siteFileUpdater.jar ${in_authored} ${in_newFeatures}
27
david_williams91f39022009-02-07 21:57:00 +000028if [ "$?" -ne "0" ]
29then
30 exit $?
31fi
32
david_williamsed5201c2007-05-27 05:48:38 +000033# copy to discovery site
34# Note: here we are changing names from site specific site file name, to generic site.xml
david_williams2fec6312007-05-27 06:24:24 +000035rsync -p ${in_authored} ${updateSite}/site.xml
david_williamsed5201c2007-05-27 05:48:38 +000036
david_williams91f39022009-02-07 21:57:00 +000037
38if [ "$?" -ne "0" ]
39then
40 exit $?
41fi
42
david_williamsed5201c2007-05-27 05:48:38 +000043rm ${in_newFeatures}