From 5437d6fd18b1566a1710e927433d953e7a88f9a1 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Sat, 1 Jun 2024 08:58:51 +0200 Subject: [PATCH] NC: Update test if an app's upgrade is available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit occ app:update change the message if no upgrade… --- github/check.nextcloud.update | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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