From 17e8bdedf6ade8cfed69cf4ec7895c688c925e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 14 Apr 2020 14:03:04 +0200 Subject: [PATCH] Rename heper --- data/helpers.d/utils | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/data/helpers.d/utils b/data/helpers.d/utils index 65b6d0d1c..e1fdc1333 100644 --- a/data/helpers.d/utils +++ b/data/helpers.d/utils @@ -489,23 +489,24 @@ ynh_check_app_version_changed () { # Compare the current package version against another version given as an argument. # This is really useful when we need to do some actions only for some old package versions. # -# example: ynh_compare_package_version --comparison gt --version 2.3.2~ynh1 +# example: ynh_compare_current_package_version --comparison gt --version 2.3.2~ynh1 # This example will check if the installed version is greater than (gt) the version 2.3.2~ynh1 # # Generally you might probably use it as follow in the upgrade script # -# if ynh_compare_package_version --comparaison gt --version 2.3.2~ynh1; then +# if ynh_compare_current_package_version --comparaison gt --version 2.3.2~ynh1 +# then # # Do something that is needed for the package version older than 2.3.2~ynh1 # fi # -# usage: ynh_compare_package_version --comparison lt|gt|le|ge +# usage: ynh_compare_current_package_version --comparison lt|gt|le|ge # | arg: --comparison - Comparison type. Could be : le (lower than), gt (greater than), le (lower or equal), ge (greater or equal) # | arg: --version - The version to compare. Need to be a version in the yunohost package version type (like 2.3.1~ynh4) # # Return 0 if the evaluation is true. 1 if false. # # Requires YunoHost version 3.8.0 or higher. -ynh_compare_package_version() { +ynh_compare_current_package_version() { local legacy_args=cv declare -Ar args_array=( [c]=comparison= [v]=version= ) local version