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}"
|
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' "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}"
|
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 {{{
|
## It's an upgrade for a previous major release {{{
|
||||||
else
|
else
|
||||||
|
@ -99,8 +96,11 @@ while IFS= read -r nc_new_version; do
|
||||||
# }}}
|
# }}}
|
||||||
# Same version {{{
|
# Same version {{{
|
||||||
else
|
else
|
||||||
[ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : Test version — The current version is up-to-date."
|
## If no previous upgrade was already detected
|
||||||
rm -f -- "${nc_new_version_file}"
|
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
|
fi
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue