diff options
Diffstat (limited to 'hooks')
| -rw-r--r-- | hooks/post-receive | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/hooks/post-receive b/hooks/post-receive index 051bd55..1240593 100644 --- a/hooks/post-receive +++ b/hooks/post-receive @@ -5,4 +5,23 @@ 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 = ( + '<footer>\n<hr>\n' + '<a href="https://twt.gumx.cc">twt</a> /\n' + '<a href="https://git.gumx.cc">git</a> /\n' + '<a href="https://mail.gumx.cc">mail</a> /\n' + '<a href="https://irc.gumx.cc">irc</a> /\n' + '<a href="https://files.gumx.cc">files</a> /\n' + '<a href="https://vpn.gumx.cc">vpn</a> /\n' + '<a href="https://pgp.gumx.cc">pgp</a> /\n' + '<a href="https://demo.gumx.cc">demo</a> /\n' + '<a href="https://wk.fo">wk.fo</a>\n' + '</footer>' +) +open(p, 'w').write(html.replace('</body>', footer + '\n</body>')) +EOF echo "ccc deployed to coffee.gumx.cc" |
