From 0d00baef288f4adc8b695423e5c1d3bad4090a79 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 28 Jun 2021 21:06:15 +0200 Subject: [PATCH] Reorder steps --- scripts/upgrade | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index d76541c..efe8f7a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -46,6 +46,17 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# CHECK VERSION NUMBER +#================================================= + +if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then + sleep 60 +fi +abort_if_up_to_date +# previous function is what defines 'version', more precisely the 'previous version' +previous_version="${version}" + #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -72,17 +83,6 @@ if ! ynh_permission_exists --permission="admin"; then ynh_permission_create --permission="admin" --allowed=$admin fi -#================================================= -# CHECK VERSION NUMBER -#================================================= - -if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then - sleep 60 -fi -abort_if_up_to_date -# previous function is what defines 'version', more precisely the 'previous version' -previous_version="${version}" - #================================================= # MANAGE UPGRADE FROM PREVIOUS VERSION #=================================================