Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit3477a5795c29226dd4c7ec6b46178bde698d24db (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-10-23 14:56:42 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-10-23 14:56:42 +0300
Filesc1fe46215210cd25e45c807dedba545819dc79a7
csg-3477a5795c29226dd4c7ec6b46178bde698d24db.tar
csg-3477a5795c29226dd4c7ec6b46178bde698d24db.tar.gz
csg-3477a5795c29226dd4c7ec6b46178bde698d24db.zip
Parentf0c5b6f8fd9d1159be01b2bfd084e4fff281e6e5 (diff)
[s1] Reworked from find | while to while heredoc for better file path compatibility
1 files changed, 4 insertions, 2 deletions
-rwxr-xr-xcsg6
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