diff --git a/github/check.nextcloud.update b/github/check.nextcloud.update index b1b1199..1b3e197 100755 --- a/github/check.nextcloud.update +++ b/github/check.nextcloud.update @@ -114,10 +114,14 @@ rm --force -- "${nc_new_version_list}" rm --force -- "${nc_app_new_version_file}" ; touch -- "${nc_app_new_version_file}" printf '%s' "${nc_app_upgrade}" >> "${nc_app_new_version_file}" -## If the file exists with a size bigger than 0 -if [ -s "${nc_app_new_version_file}" ]; then +## If the file contains a part of the message if ane upgrade is available +## Example of message if at least one upgrade : +## files_antivirus new version available: 5.5.3 +if grep --quiet -- "new version available" "${nc_app_new_version_file}"; then [ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : Apps test — Upgrade seems to be available for apps. Please check ${nc_app_new_version_file}." else + ## Example of message if NO upgrade: + ## All apps are up-to-date or no updates could be found [ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : Apps test — All apps seems up-to-date." rm --force -- "${nc_app_new_version_file}" fi