mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
ncp-update-nc: Improve output if no new NC version is available
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
parent
bf98d0eade
commit
bb98f597e9
@ -41,6 +41,10 @@ ncc status &>/dev/null || { [[ "$DBG" == x ]] && ncc status; echo "Next
|
|||||||
[[ ${EUID} -eq 0 ]] && SUDO="sudo -u www-data"
|
[[ ${EUID} -eq 0 ]] && SUDO="sudo -u www-data"
|
||||||
CURRENT="$(nc_version)"
|
CURRENT="$(nc_version)"
|
||||||
TARGET_VERSION="$(determine_nc_upgrade_version "${CURRENT?}" "${VER?}")"
|
TARGET_VERSION="$(determine_nc_upgrade_version "${CURRENT?}" "${VER?}")"
|
||||||
|
[[ "$TARGET_VERSION" == "$CURRENT" ]] && {
|
||||||
|
echo "Nextcloud version ${CURRENT} is already installed. Nothing to do."
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
[[ -n "$TARGET_VERSION" ]] || {
|
[[ -n "$TARGET_VERSION" ]] || {
|
||||||
echo "Could not find a valid upgrade path from '${CURRENT}' to '${TARGET_VERSION}'. Nothing to update."
|
echo "Could not find a valid upgrade path from '${CURRENT}' to '${TARGET_VERSION}'. Nothing to update."
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@ -534,6 +534,7 @@ function determine_nc_upgrade_version() {
|
|||||||
|
|
||||||
if [[ "${supported_maj}" -le "${current_maj}" ]]
|
if [[ "${supported_maj}" -le "${current_maj}" ]]
|
||||||
then
|
then
|
||||||
|
echo "$current"
|
||||||
# No update available
|
# No update available
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user