From af9647dfaab789d3b5ad72965f1f332291814f33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig-=C3=98rjan=20Smelror?= Date: Wed, 31 Jan 2024 21:06:11 +0100 Subject: [PATCH] _list_blog: Squashing output to console. --- qsgen2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qsgen2 b/qsgen2 index f488edc..0ef70e3 100755 --- a/qsgen2 +++ b/qsgen2 @@ -170,10 +170,10 @@ export blogdate=$( date +%a-%Y-%b-%d ) function _list_blog() { local debug=false - local blog_files=(blog/*.blog) + # local blog_files=(blog/*.blog) # Check if array is empty - if (( ${#blog_files[@]} == 0 || ! -f ${blog_files[1]} )); then + if [[ -z "$(ls -A blog/*.blog 2>/dev/null)" ]]; then if (${debug}); then _msg debug "_list_blog: No blog files found."; fi return else