| #!/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 ${fromDir}/digest.zip ${toDir} |
| |
| |
| rsync -p ${fromDir}/*.html ${toDir} |
| rsync -p ${fromDir}/*.jpg ${toDir} |
| rsync -p ${fromDir}/*.xml ${toDir} |
| |
| # Typically, as of this writing |
| # Europa: 'declaredUpdates' to 'milestones' |
| # Callisto: 'testUpdates' to 'updates' |
| |
| # compute last segment in directory names, as a heurisic to update internal URL links |
| fromLastSegment=${fromDir##*/} |
| toLastSegment=${toDir##*/} |
| |
| 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} ${toDir}/*.html |
| perl -pi -e ${replaceCommand} ${toDir}/*.xml |
| |
| |
| |
| |
| |