blob: 0ba41961774e31fbbadce93e19fd7d9e335b040d [file] [log] [blame]
david_williams2b40dfc2008-05-28 04:35:54 +00001#!/bin/sh
2
3# script to copy site files
4
5source ./parseSiteArg.shsource
6
7# important: make sure digest is updated same time as site.xml's
8# TODO: should digest be recreated on final site? No for "exact" sites, yes, if "merged" sites.
9rsync -p ${milestoneDirectory}/digest.zip ${milestoneDirectory}
10
11
12rsync -p ${milestoneDirectory}/*.html ${releaseDir}
13rsync -p ${milestoneDirectory}/*.jpg ${releaseDir}
14rsync -p ${milestoneDirectory}/*.xml ${releaseDir}
15
16# Typically, as of this writing
17# Europa: 'milestoneDirectory' to 'releaseDir'
18
19
20# compute last segment in directory names, as a heurisic to update internal URL links
21fromLastSegment=${milestoneDirectory##*/}
22toLastSegment=${releaseDir##*/}
23
24echo ""
25echo " Updating site files:"
26echo " from: ${fromLastSegment}"
27echo " to: ${toLastSegment}"
28echo ""
29
30fromString="webtools/${fromLastSegment}"
31toString="webtools/${toLastSegment}"
32replaceCommand="s!${fromString}!${toString}!g"
33
34#echo ${replaceCommand};
35
36perl -pi -e ${replaceCommand} ${releaseDir}/*.html
37perl -pi -e ${replaceCommand} ${releaseDir}/*.xml
38
39# now re-run the digester and P2 Generator
david_williamsdb911a72008-06-11 15:34:10 +000040./ant.sh -f createDigests.xml -Declipse.home=${eclipseLocation} -Dupdate.site=${releaseDir}
david_williams2b40dfc2008-05-28 04:35:54 +000041# create P2 repository metadata
david_williamsdb911a72008-06-11 15:34:10 +000042./ant.sh -f createP2Repo.xml -Declipse.home=${eclipseLocation} -Dupdate.site=${releaseDir}
david_williams2b40dfc2008-05-28 04:35:54 +000043
44