blob: 831acff41dec8ff1206077a7878d97dca3d66374 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/bin/bash
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"
elif [ "$i" == "*.html" ]; then
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"
|