#!/bin/bash
gawk '
/
/ {
print $0
getline #TODO: check this is the
")) {
print $0
getline
}
print ""
exit
}
' < manual/index.html > toc.tmp
for a in manual/*.html
do
if [ $a != "manual/index.html" ]
then
#add " - PBC" to titles of all pages
sed '/<\/title>/ s/<\/title>/ - PBC&/' -i $a
sed '/
} ' -i $a
sed '/^<\/body/i ' -i $a
fi
done
gawk '
/","")
}
{ print }
' < manual/index.html | sed '/
r index.html
a
} ' > tmp.tmp
mv tmp.tmp manual/index.html
rm toc.tmp