blob: 12405938d367619b8eb2d07fc1e95f86af3a9a2d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/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 = (
'<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"
|