redo-ifchange *.texi ../VERSION
html=tofuproxy.html
rm -f $html/*.html
${MAKEINFO:=makeinfo} --html \
    -D "VERSION `cat ../VERSION`" \
    --set-customization-variable NO_CSS=1 \
    --set-customization-variable SECTION_NAME_IN_TITLE=1 \
    --set-customization-variable TREE_TRANSFORMATIONS=complete_tree_nodes_menus \
    --set-customization-variable FORMAT_MENU=menu \
    --set-customization-variable DATE_IN_HEADER=1 \
    --set-customization-variable ASCII_PUNCTUATION=1 \
    --output $html index.texi
cp -a *.webp ../PUBKEY-* $html/
(
    cd $html/download
    export ATOM_ID="e1e74079-3844-11ee-9b0c-a4ae1277b945"
    export NAME=tofuproxy
    export BASE_URL=http://www.tofuproxy.stargrave.org/download
    export AUTHOR_EMAIL=tofuproxy@stargrave.org
    ~/work/releases-feed/releases.atom.zsh
)
perl -i -npe 'print "<link rel=\"alternate\" title=\"Releases\" href=\"download/releases.atom\" type=\"application/atom+xml\">\n" if /^<\/head>/' $html/Install.html
find $html -type d -exec chmod 755 {} +
find $html -type f -exec chmod 644 {} +
