support multi dir

you can now have multiple directories in pages/ and they will all end up
in builds/
This commit is contained in:
Jus de Patate_ 2021-07-28 17:37:22 +02:00
parent 7a28c1125a
commit 16aa6dae2d
1 changed files with 3 additions and 1 deletions

4
mkhtml
View File

@ -49,8 +49,10 @@ fi
echo ""
echo "Building files..."
# https://stackoverflow.com/a/54563899
cd $PAGESDIR
find -type d -links 2 -exec mkdir -p "$BUILDSDIR/{}" \;
# https://stackoverflow.com/a/54563899
find . -type f -print0 | while IFS= read -r -d $'\0' file; do
filename=$(echo $file | sed 's/.\///')
newloc="$BUILDSDIR/$filename"