From 1fd145e59860b4bdd313b75ffccc5f5524a65f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 2 Jun 2023 11:55:04 +0200 Subject: [PATCH] Update upgrade --- scripts/upgrade | 3 +++ 1 file changed, 3 insertions(+) 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