#!/bin/sh -e

# Update the project webpages with autogenerated documentation

# Regenerate the readme
rst2html --stylesheet=morn.css README | sed -e \
's,h3>,h4>,;s,h2>,h3>,;s,h1>,h2>,' > README.html

file=/org/alioth.debian.org/chroot/home/groups/libapt-front/htdocs/README.html

# Copy the README on Alioth
scp README.html alioth.debian.org:$file.new

# Atomically put the README into place
ssh alioth.debian.org "chmod 644 $file.new && mv $file.new $file"
