summaryrefslogtreecommitdiff
path: root/finalize_build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'finalize_build.sh')
-rwxr-xr-xfinalize_build.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/finalize_build.sh b/finalize_build.sh
new file mode 100755
index 0000000..831acff
--- /dev/null
+++ b/finalize_build.sh
@@ -0,0 +1,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"