Trying more debugging

This commit is contained in:
Stig-Ørjan Smelror 2024-01-29 22:35:17 +01:00
parent c22d015762
commit 76c7bbf0aa

12
qsgen2
View File

@ -307,22 +307,22 @@ function _pages() {
do do
echo "${green}Generating Page: ${pages_in_array}${end}" echo "${green}Generating Page: ${pages_in_array}${end}"
# Read the file once # Read the file once
if (${debug}) echo "_pages: Loading page_content" if (${debug}) echo "_pages: Loading page_content once"
local page_content="$(<${pages_in_array})" local page_content="$(<${pages_in_array})"
echo "PAGE CONTENT" #echo "PAGE CONTENT"
echo "$page_content" #echo "$page_content"
exit #exit
# Grab the title from the Page # Grab the title from the Page
if (${debug}) echo "_pages: Grepping for page_title" if (${debug}) echo "_pages: Grepping for page_title"
page_title=$( head -2 ${page_content} | grep '#title' | cut -d= -f2 ) page_title=$( head -1 ${page_content} | grep '#title' | cut -d= -f2 )
echo "Page Title: ${page_title}" echo "Page Title: ${page_title}"
exit exit
# Remove the #title line from the buffer. No longer needed. # Remove the #title line from the buffer. No longer needed.
page_content=$( grep -v '#title' ${page_content} > /dev/null ) page_content=$( grep -v '#title' ${page_content} )
echo "${page_content}" echo "${page_content}"
exit exit