blob: 1129c1f0572c9301c9cf72a192647a293795dad9 [file] [log] [blame]
david_williams72901652008-05-28 04:30:46 +00001#!/bin/sh
2
3# script to copy site files
4
david_williams7a915b32008-06-13 14:04:27 +00005if [ -z $BUILD_INITIALIZED ]
6then
7 source properties.shsource
8 source parseSiteArg.shsource $stream
9 export BUILD_INITIALIZED=1
10fi
david_williams72901652008-05-28 04:30:46 +000011
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_williams1dcfdeb2008-05-28 06:47:14 +000014#rsync -p ${testUpdateSite}/digest.zip ${milestoneDirectory}
david_williams72901652008-05-28 04:30:46 +000015
16
17rsync -p ${testUpdateSite}/*.html ${milestoneDirectory}
18rsync -p ${testUpdateSite}/*.jpg ${milestoneDirectory}
19rsync -p ${testUpdateSite}/*.xml ${milestoneDirectory}
david_williams087b3022009-06-09 03:29:59 +000020rsync -p ${testUpdateSite}/*.build ${milestoneDirectory}
david_williams72901652008-05-28 04:30:46 +000021
22# Typically, as of this writing
23# Europa: 'testTempUpdates' to 'milestones'
24
25
26# compute last segment in directory names, as a heurisic to update internal URL links
27fromLastSegment=${testUpdateSite##*/}
28toLastSegment=${milestoneDirectory##*/}
29
30echo ""
31echo " Updating site files:"
32echo " from: ${fromLastSegment}"
33echo " to: ${toLastSegment}"
34echo ""
35
36fromString="webtools/${fromLastSegment}"
37toString="webtools/${toLastSegment}"
38replaceCommand="s!${fromString}!${toString}!g"
39
david_williams1dcfdeb2008-05-28 06:47:14 +000040echo "replaceCommand: ${replaceCommand}"
david_williams72901652008-05-28 04:30:46 +000041
david_williams1dcfdeb2008-05-28 06:47:14 +000042perl -pi -w -e ${replaceCommand} ${milestoneDirectory}/*.html
43perl -pi -w -e ${replaceCommand} ${milestoneDirectory}/*.xml
david_williams72901652008-05-28 04:30:46 +000044
david_williams72901652008-05-28 04:30:46 +000045# create P2 repository metadata
david_williamsdb911a72008-06-11 15:34:10 +000046./ant.sh -f createP2Repo.xml -Declipse.home=${eclipseLocation} -Dupdate.site=${milestoneDirectory}
david_williams72901652008-05-28 04:30:46 +000047
48