Debug zsh

This commit is contained in:
Stig-Ørjan Smelror 2024-01-31 17:32:56 +01:00
parent 3110dd1ebd
commit 384783f72f

8
qsgen2
View File

@ -1,6 +1,6 @@
#!/usr/bin/zsh #!/usr/bin/zsh
set -x # set -x
# Quick Site Generator 2 is a static website generator inspired by Nikola. # Quick Site Generator 2 is a static website generator inspired by Nikola.
# It is written for the Z shell (zsh) because that's what I use and also because I like it better than Bash. # It is written for the Z shell (zsh) because that's what I use and also because I like it better than Bash.
@ -105,12 +105,12 @@ else
fi fi
debug=true debug=true
if (${debug}); then if (${debug}); then
qsconfig=( $( cat $(pwd)/config | grep -v \# | awk '{print substr($0, index($0, " ") + 1)}' ) ) qsconfig=$( cat $(pwd)/config | grep -v \# | awk '{print substr($0, index($0, " ") + 1)}' )
# qsconfig=$(<${qsconfig}) # qsconfig=$(<${qsconfig})
echo "${red}Contents of Config file:${end}" echo "${red}Contents of Config file:${end}"
for qslines in ${qsconfig[@]} for qslines in ${qsconfig}
do do
echo "${yellow}- ${qslines}${end}" echo "${yellow}${qslines}${end}"
done done
#echo "${yellow} - site_name=${site_name}${end}" #echo "${yellow} - site_name=${site_name}${end}"
#echo "${yellow} - site_tagline=${site_tagline}${end}" #echo "${yellow} - site_tagline=${site_tagline}${end}"