| #!/bin/sh |
| |
| # script to copy site files |
| |
| source ./parseSiteArg.shsource |
| |
| # important: make sure digest is updated same time as site.xml's |
| # TODO: should digest be recreated on final site? No for "exact" sites, yes, if "merged" sites. |
| rsync -p ${testUpdateSite}/digest.zip ${milestoneDirectory} |
| |
| |
| rsync -p ${testUpdateSite}/*.html ${milestoneDirectory} |
| rsync -p ${testUpdateSite}/*.jpg ${milestoneDirectory} |
| rsync -p ${testUpdateSite}/*.xml ${milestoneDirectory} |
| |
| # Typically, as of this writing |
| # Europa: 'testTempUpdates' to 'milestones' |
| |
| |
| # compute last segment in directory names, as a heurisic to update internal URL links |
| fromLastSegment=${testUpdateSite##*/} |
| toLastSegment=${milestoneDirectory##*/} |
| |
| echo "" |
| echo " Updating site files:" |
| echo " from: ${fromLastSegment}" |
| echo " to: ${toLastSegment}" |
| echo "" |
| |
| fromString="webtools/${fromLastSegment}" |
| toString="webtools/${toLastSegment}" |
| replaceCommand="s!${fromString}!${toString}!g" |
| |
| #echo ${replaceCommand}; |
| |
| perl -pi -e ${replaceCommand} ${milestoneDirectory}/*.html |
| perl -pi -e ${replaceCommand} ${milestoneDirectory}/*.xml |
| |
| # now re-run the digester and P2 Generator |
| ant -f createDigests.xml -Declipse.home=${eclipseLocation} -Dupdate.site=${milestoneDirectory} |
| # create P2 repository metadata |
| ant -f createP2Repo.xml -Declipse.home=${eclipseLocation} -Dupdate.site=${milestoneDirectory} |
| |
| |