#!/bin/sh set -e WORK=/home/git/build/ccc WEBROOT=/var/www/coffee.gumx.cc mkdir -p "$WEBROOT/fonts" cp "$WORK/ccc.html" "$WEBROOT/index.html" rsync -rlptD "$WORK/fonts/" "$WEBROOT/fonts/" 2>/dev/null || true python3 - "$WEBROOT/index.html" <<'EOF' import sys p = sys.argv[1] html = open(p).read() footer = ( '' ) open(p, 'w').write(html.replace('', footer + '\n')) EOF echo "ccc deployed to coffee.gumx.cc"