From 8105b7aa81abcf19cdc9a6d7af191f3bb4f0d853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig-=C3=98rjan=20Smelror?= Date: Sun, 18 Feb 2024 11:27:42 +0100 Subject: [PATCH] _sitemap: Fix finding the files --- qsgen2 | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/qsgen2 b/qsgen2 index 766f434..120c90c 100755 --- a/qsgen2 +++ b/qsgen2 @@ -925,14 +925,10 @@ function _sitemap() { # Find all HTML files and store them in an array # local -a html_files=("${(@f)$(find "${www_root}" -type f -name "*.html")}") local -a html_files=(${www_root}/**/[a-z]*.html(.)) - local -a blog_files=$(echo ${html_files[@]} | grep blog) - local -a page_files=$(echo ${html_files[@]} | grep -v blog) + local -a blog_files=("${(@)html_files[@]}" | grep blog) + local -a page_files=$("${(@)html_files[@]}" | grep -v blog) local -a xml_files=(${www_root}/[a-z]*.xml(.)) - xml_files=$( echo ${xml_files[@]} | grep -v "sitemap.xml" ) - # Working on provinding 2 sitemaps, 1 for pages and 1 for blogs. - # sitemap-pages.xml - # sitemap-blogs.xml - # And in the main sitemap.xml file we link to these two + xml_files=$( "${(@)xml_files[@]}" | grep -v "sitemap.xml" ) # Start of the XML file for BLOGS echo '' > ${b_file}