summaryrefslogtreecommitdiffstats
path: root/build.sh
blob: 99db45b1d271015fc22764696f1659c8b0567dff (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
28
29
30
31
#!/bin/sh

[ ! -d dist ] && mkdir dist

rm -f dist/*

cp ./*.css ./*.svg ./*.png ./*.jpg dist/

awk -f lib/inc.awk ./*.html

for file in ./*.html; do
	if [ "$file" = "index.html" ] ||
		[ ! -f "${file%%.html}-inc.htm" ]; then
		cp "$file" dist/
		continue
	fi
	ed "$file" <<EOF
?<\/body>?-r footer.htm
?{{incoming}}?d
-r ${file%%.html}-inc.htm
w dist/$file
q
EOF
done

journal="decadv-2025"
[ -x "$(which html-journal)" ] && {
	html-journal "${journal}.html" "https://aaoth.xyz/${journal}.html" > dist/"${journal}-atom.xml"
}

rm ./*-inc.htm