From 14258f5b202025b94f59b0608ebcc73bfd6689f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig-=C3=98rjan=20Smelror?= Date: Mon, 19 Feb 2024 20:00:16 +0100 Subject: [PATCH] qsgen2: Add option to update sitemaps only again --- qsgen2 | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/qsgen2 b/qsgen2 index ce392a8..01ed3c4 100755 --- a/qsgen2 +++ b/qsgen2 @@ -137,22 +137,6 @@ fi blog_cache_file="${project_dir}/.blog_cache" pages_cache_file="${project_dir}/.pages_cache" -case ${1} in - force) - _msg sub "_qsgen2_msg_2" - : >| "$blog_cache_file" # Truncate the blog cache before doing update - : >| "$pages_cache_file" # Truncate the page cache before doing update - ;; - sitemap) - _msg sub "Updating sitemaps" - _sitemap - exit - ;; - *) - # Nothing - ;; -esac - # Let's check if qsgen2 can generate this site by checking if 'generator' is available if [[ ! ${generator} ]] || [[ -d $(pwd)/.git ]]; then _msg debug "_qsgen2_msg_3" @@ -1321,6 +1305,23 @@ function _zhtml() { } + +case ${1} in + force) + _msg sub "_qsgen2_msg_2" + : >| "$blog_cache_file" # Truncate the blog cache before doing update + : >| "$pages_cache_file" # Truncate the page cache before doing update + ;; + sitemap) + _msg sub "Updating sitemaps" + _sitemap + exit + ;; + *) + # Nothing + ;; +esac + _blogs _pages _sitemap