_list_blog: Add check if blog is empty or not.
This commit is contained in:
parent
2a00602e91
commit
3df24ddaad
13
qsgen2
13
qsgen2
@ -169,9 +169,16 @@ export blogdate=$( date +%a-%Y-%b-%d )
|
|||||||
# Let's create arrays of all the files we'll be working on
|
# Let's create arrays of all the files we'll be working on
|
||||||
|
|
||||||
function _list_blog() {
|
function _list_blog() {
|
||||||
ls -1btar blog/*.blog | while read -r file; do
|
# Check if there are any .blog files in the blog directory
|
||||||
blogs_file_array+=($file)
|
local blog_files=(blog/*.blog)
|
||||||
done
|
if [[ ! -f ${blog_files[1]} ]]; then
|
||||||
|
if (${debug}); then _msg debug "_blog_cache: No blog files found."; fi
|
||||||
|
return
|
||||||
|
else
|
||||||
|
ls -1btar blog/*.blog | while read -r file; do
|
||||||
|
blogs_file_array+=($file)
|
||||||
|
done
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# BLOG CACHE
|
# BLOG CACHE
|
||||||
|
Loading…
Reference in New Issue
Block a user