Ensure to create temp file to monitore…

This commit is contained in:
Jeremy Gardais 2023-12-08 11:54:28 +01:00
parent 9d91850b35
commit 4148c2f5d1
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 5 additions and 1 deletions

View File

@ -241,12 +241,16 @@ main() { # {{{
if is_version_greater_than "${new_version}" "${current_version}" "|| "; then if is_version_greater_than "${new_version}" "${current_version}" "|| "; then
debug_message "| Current version (${current_version}) is older than new one \ debug_message "| Current version (${current_version}) is older than new one \
(${new_version})." (${new_version})."
### Create a temp file to monitore
touch -- "${new_version_file}"
printf '\e[1;35m%-6s\e[m\n' "An upgrade is available for Owncloud (current: ${current_version}): ${new_version}." >> "${new_version_file}"
printf '\e[1;35m%-6s\e[m\n' "Please also take a look to the CHANGELOG: https://owncloud.com/changelog/server/" >> "${new_version_file}"
## }}} ## }}}
## If current version is uptodate {{{ ## If current version is uptodate {{{
else else
debug_message "| Current version (${current_version}) seems uptodate \ debug_message "| Current version (${current_version}) seems uptodate \
or newer than available version (${new_version})." or newer than available version (${new_version})."
### Ensure to remove any temp file and useless .deb files ### Ensure to remove any temp file
rm --force -- "${new_version_file}" rm --force -- "${new_version_file}"
### Exit ### Exit
debug_message "-- Test version END" debug_message "-- Test version END"