Why don't you make index.html into a php file? Instead of a search and replace you could just insert a value with a variable or file include. Much easier to do.
add this to index.html:
<? include ('build_date.txt'); ?>
replace your link with this:
<a href="Trunk/Camino-ppc7450-<? echo $build_date; ?>.dmg">Camino-ppc7450-<? echo $build_date; ?>.dmg</a><br>
now your script just creates a simple text file called build_date.txt in the same folder as index.html.
the file contains just this:
<? $build_date = '2005.09.22'; ?>
so your script just needs to overwrite this file with something like this:
echo "<? $build_date = '`date +%Y.%m.%d`"'; ?>" > build_date.txt
(it's been a while so don't hold me to the shell script syntax)
sed will do the trick, but this may be a lot easier then debugging a complex regex
you'll need to make sure apache is set up to serve php files either using index.php or having php handle all html files
It's cool that there is always another way to do it.
