diff options
author | Preston Pan <preston@nullring.xyz> | 2022-11-08 10:28:58 -0800 |
---|---|---|
committer | Preston Pan <preston@nullring.xyz> | 2022-11-08 10:28:58 -0800 |
commit | dc2fd65e6bfeaa2c475d5042f64263ac9427c22f (patch) | |
tree | 3f680c74d831c984048080e0ff7d86fb7c5f1f05 /finalize_build.sh |
completely changed backend
Diffstat (limited to 'finalize_build.sh')
-rwxr-xr-x | finalize_build.sh | 14 |
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" |