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