blob: 7c7e44bbdb891a4d02f0444084bc1b286f56a8a5 [file] [log] [blame]
#!/bin/sh
# script to copy site files
source ./parseSiteArg.shsource
cp -f -p -r -v --update ${fromDir}/*html --target-directory=${toDir}/
cp -f -p -r -v --update ${fromDir}/*.gif --target-directory=${toDir}/
cp -f -p -r -v --update ${fromDir}/web --target-directory=${toDir}/
cp -f -p -r -v --update ${fromDir}/*.xml --target-directory=${toDir}/
# TODO ... make this handle 'milestones' or 'updates'
fromLastSegment = ${fromDir##*/}
toLastSegment = ${fromDir##*/}
echo "from: ${fromLastSegment}"
echo " to: ${toLastSegment}
perl -pi -e 's/webtools\/${fromLastSegment}/webtools\/${toLastSegment}/g' ${toDir}/index.html
perl -pi -e 's/webtools\/${fromLastSegment}/webtools\/${toLastSegment}/g' ${toDir}/site.xml
# important: make sure digest is updated same time as site.xml's
# TODO: digest should be recreated on final site?
cp -f -p -r -v --update ${fromDir}/digest.zip --target-directory=${toDir}/