Empty TEMP_MACO_UPDATE file if too old
This commit is contained in:
parent
7b33a5947d
commit
3b29544775
|
@ -217,7 +217,7 @@ No Maco urgent update is planned."
|
||||||
|
|
||||||
}
|
}
|
||||||
# }}}
|
# }}}
|
||||||
# Verify the status of last Maco update
|
# Verify the status of last Maco update {{{
|
||||||
check_last_update_status() {
|
check_last_update_status() {
|
||||||
|
|
||||||
## Check if Maco status file is present and readable
|
## Check if Maco status file is present and readable
|
||||||
|
@ -281,13 +281,18 @@ main() { # {{{
|
||||||
# Create or empty previous file only if too old
|
# Create or empty previous file only if too old
|
||||||
regenerate_if_too_old "${PLUGIN_RESULT}"
|
regenerate_if_too_old "${PLUGIN_RESULT}"
|
||||||
regenerate_if_too_old "${PLUGIN_STATE}"
|
regenerate_if_too_old "${PLUGIN_STATE}"
|
||||||
|
regenerate_if_too_old "${TEMP_MACO_UPDATE}"
|
||||||
|
|
||||||
|
## If TEMP_MACO_UPDATE file is empty
|
||||||
|
if is_file_empty "${TEMP_MACO_UPDATE}"; then
|
||||||
|
## (re)check Maco update
|
||||||
|
get_maco_update
|
||||||
|
fi
|
||||||
|
|
||||||
## If any previous file is empty
|
## If any previous file is empty
|
||||||
if is_file_empty "${PLUGIN_RESULT}" || is_file_empty "${PLUGIN_STATE}"; then
|
if is_file_empty "${PLUGIN_RESULT}" || is_file_empty "${PLUGIN_STATE}"; then
|
||||||
## Add HTML header for this part
|
## Add HTML header for this part
|
||||||
add_header "Compare version" >> "${PLUGIN_RESULT}"
|
add_header "Compare version" >> "${PLUGIN_RESULT}"
|
||||||
## (re)check Maco update
|
|
||||||
get_maco_update
|
|
||||||
## Analyze Maco update result (add color,…)
|
## Analyze Maco update result (add color,…)
|
||||||
analyze_maco_update
|
analyze_maco_update
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue