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