diff --git a/scripts/upgrade b/scripts/upgrade index f508d3f..df854d0 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -93,6 +93,9 @@ ynh_add_nginx_config # VERSION TO THE NEXT ONE #================================================= +current_version=$(grep OC_VersionString "$install_dir/version.php" | cut -d\' -f2) +current_major_version=${current_version%%.*} + # Define a function to execute commands with `occ` exec_occ() { # Backward compatibility to upgrade from older versions