We take the "brute force" approach using the following bash/sed script.
(Please note, javadoc creates some ugly files called "*.html" in the created directories,
which lead to an error message when sed tries to process them. We haven't figured out yet how to avoid this, but it seems to be harmless for our purpose !-)
Of course, an xslt script would be more professional, ...
#!/bin/sh
# patch favicon into header of javadoc generated api doc html
#
# assume started with P=`pwd` , then the args must be
# 1 directory to process / full path relative to $P
# 2 favicon filename to insert / full path relative to $P
function patchIt () {
for f in $1/*.html ; do
tmpfile=`mktemp -p . `
sed -e " s%<HEAD>%<HEAD><link rel=\"icon\" href=\"$2\" type=\"image/png\"/>%" \
$f > $tmpfile ; mv $tmpfile $f ;
done ;
for d in $1/* ; do
if [ -d $d ]; then echo "descending to "$d ; patchIt $d ../$2 ; fi ;
done
}
patchIt $1 $2
#eof