summaryrefslogtreecommitdiff
path: root/finalize_build.sh
blob: 0042901a71a673d6388ae1a38ac115b9738d5c05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

ROOT_DIR="./build/website/"
# replace placeholder tags with stuff
for i in $(find "$ROOT_DIR" -type f -name '*.html'); do
	if [ "$(basename "$i")" = 'index.html' ];
	then
		sed -i -e 's|<!--BACKDIR-->|\| <a href="\.\./index\.html">Back</a>|g' "$i"
	else
		sed -i -e 's|<!--BACKDIR-->|\| <a href="\./index\.html">Back</a>|g' "$i"
	fi
done;

sed -i -e 's|\| <a href="\.\./index\.html">Back</a>||g' "$ROOT_DIR/index.html"