Refactor _blog_index function in qsgen2 script
This commit refactors the _blog_index function in the qsgen2 script. The changes include: - Commenting out the debug messages for the content of blog_index_content. - Using the `tee` command with the `-overwrite` option to write the blog_index_content to ${www_root}/blog/index.html. - Redirecting the output of `tee` to /dev/null to suppress any output.
This commit is contained in:
parent
d8801d3b3f
commit
4c57f98146
9
qsgen2
9
qsgen2
@ -917,13 +917,10 @@ function _blog_index() {
|
||||
if (${debug}); then
|
||||
_msg debug "_blog_index: Writing ${www_root}/blog/index.html"
|
||||
_msg debug "_blog_index: Content length of blog_index_content: ${#blog_index_content}"
|
||||
_msg debug "_blog_index: Content of blog_index_content"
|
||||
_msg sub "${blog_index_content}"
|
||||
#_msg debug "_blog_index: Content of blog_index_content"
|
||||
#_msg sub "${blog_index_content}"
|
||||
fi
|
||||
printf "%s" "$blog_index_content" > ${www_root}/blog/index.html || {
|
||||
echo "Failed to write to ${www_root}/blog/index.html"
|
||||
exit 1
|
||||
}
|
||||
echo "$blog_index_content" | tee -overwrite ${www_root}/blog/index.html > /dev/null
|
||||
_f_last_updated ${www_root}/blog/index.html
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user