mirror of https://gitlab.com/octtspacc/sitoctt
13 lines
348 B
Bash
Executable File
13 lines
348 B
Bash
Executable File
#!/bin/sh
|
|
. "$(dirname "$(realpath "$0")")/Lib/Globals.sh"
|
|
cd "${swd}/.."
|
|
|
|
cd ./build/public
|
|
find . -type f -name index.html -exec sh -c '
|
|
nicepath="$(echo "{}" | rev | cut -d/ -f2- | rev)"
|
|
niceurl="./$(echo "${nicepath}" | rev | cut -d/ -f1 | rev)/"
|
|
sed -e "s|{URL}|${niceurl}|g" ../../redirectTemplate.html > "${nicepath}.html"
|
|
' \;
|
|
|
|
cd "${owd}"
|