From 16aa6dae2ddc3d79f5d0d89da3bbd9214c27bc9f Mon Sep 17 00:00:00 2001 From: Jus de Patate Date: Wed, 28 Jul 2021 17:37:22 +0200 Subject: [PATCH] support multi dir you can now have multiple directories in pages/ and they will all end up in builds/ --- mkhtml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mkhtml b/mkhtml index 2429045..1ff891e 100755 --- a/mkhtml +++ b/mkhtml @@ -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"