Remove temp file only if no upgrade detected
This commit is contained in:
parent
451cd0b01a
commit
b5678dffe2
|
@ -86,9 +86,6 @@ while IFS= read -r nc_new_version; do
|
|||
touch -- "${nc_new_version_file}"
|
||||
printf '\e[1;35m%-6s\e[m\n' "An upgrade is available for Nextcloud (current : ${nc_current_version}) : ${nc_new_version}." >> "${nc_new_version_file}"
|
||||
printf '\e[1;35m%-6s\e[m\n' "Please also take a look to the CHANGELOG : https://nextcloud.com/changelog/#latest${nc_new_major}" >> "${nc_new_version_file}"
|
||||
|
||||
### Exit to ensure to keep the file in place
|
||||
exit 0
|
||||
## }}}
|
||||
## It's an upgrade for a previous major release {{{
|
||||
else
|
||||
|
@ -99,9 +96,12 @@ while IFS= read -r nc_new_version; do
|
|||
# }}}
|
||||
# Same version {{{
|
||||
else
|
||||
## If no previous upgrade was already detected
|
||||
if [ ! -s "${nc_app_new_version_file}" ]; then
|
||||
[ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : Test version — The current version is up-to-date."
|
||||
rm -f -- "${nc_new_version_file}"
|
||||
fi
|
||||
fi
|
||||
# }}}
|
||||
|
||||
done < "${nc_new_version_list}"
|
||||
|
|
Loading…
Reference in New Issue