[WIP] Initial commit for qsgen3

This commit is contained in:
2025-05-30 20:37:56 +02:00
parent 106b66753f
commit 75105821fd
138 changed files with 12471 additions and 7 deletions

View File

@ -0,0 +1,31 @@
if [[ ${globaldebug} == "true" ]]; then
local debug=true
else
local debug=false
fi
typeset -A pages_cache
_list_pages
if [[ -f $pages_cache_file ]]; then
while IFS=':' read -r name hash; do
pages_cache[$name]=$hash
if (${debug}) _msg debug "${0:t}_msg_1" " ${pages_cache[${name}]}"
done < "$pages_cache_file"
fi
pages_array=()
for file in ${pages_file_array[@]}; do
current_hash=$(md5sum "$file" | awk '{print $1}')
if (${debug}) _msg debug "${0:t}_msg_2" " ${pages_cache[$file]}"
if (${debug}) _msg debug "${0:t}_msg_3" " current_cache: ${current_hash}"
if [[ ${pages_cache[$file]} != "$current_hash" ]]; then
if (${debug}) _msg debug "${0:t}_msg_4" " ${pages_cache[$file]}"
if (${debug}) _msg debug "${0:t}_msg_5" " current_cache: ${current_hash}"
pages_array+=("$file")
pages_cache[$file]=$current_hash
fi
done
: >| "$pages_cache_file"
for name in "${(@k)pages_cache}"; do
echo "$name:${pages_cache[$name]}" >> "$pages_cache_file"
done