mistress webshit.sh
 1set -eu
 2
 3pages='home contact'
 4
 5for page in $pages; do
 6   outdir=out/$page
 7   outdir=${outdir%/home}
 8   mkdir -p $outdir
 9   cat html.pre $page.html | sed s/@TITLE@/$page/ > $outdir/index.html
10done
11
12ln -sf ../favicon.png out/
13ln -sf ../style.css out/
14ln -sf ../_/ out/
15
16case ${1-} in
17   publish)
18      tar -C out -czhf - . | hut pages publish -d cat-n.org /dev/fd/0;;
19   serve)
20      python3 -m http.server -d out/;;
21esac