From 3477a5795c29226dd4c7ec6b46178bde698d24db Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 23 Oct 2023 14:56:42 +0300 Subject: [s1] Reworked from find | while to while heredoc for better file path compatibility --- csg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/csg b/csg index 80ee53b..53a6f70 100755 --- a/csg +++ b/csg @@ -157,10 +157,12 @@ startTimer "[Stage 1] Moving files to destination" find . -type f -not -name "\.*" -not -name '_header.html' -not -name '_footer.html' | \ cpio -pdu "$DESTINATION" >/dev/null 2>&1) -find "$DESTINATION" -type f -name "*index.md" -links +1 | while read -r file +while read -r file do mv "$file" "${file%md}html" -done +done << EOF +$(find "$DESTINATION" -type f -name "*index.md" -links +1) +EOF if [ -n "$AWKSCRIPTS" ] then -- cgit v1.3.1-23-gd82d