From a1ea2bac5dc7a08c0e8a334deb3a9793a2bf8d0c Mon Sep 17 00:00:00 2001 From: Kay0u Date: Sat, 30 May 2020 17:07:36 +0200 Subject: [PATCH] simplify upgrade script --- scripts/upgrade | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index e5c1a2e..0605a7e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -259,6 +259,9 @@ then source ./upgrade.d/upgrade.$current_major_version.first.sh elif [ -e "./upgrade.d/upgrade.$current_major_version.last.sh" ]; then source ./upgrade.d/upgrade.$current_major_version.last.sh + # Finish with the last migration if the file doesn't exist + else + source ./upgrade.d/upgrade.last.sh fi } @@ -290,11 +293,6 @@ then fi fi - # Finish with the last migration if the file doesn't exist - if [ ! -e "./upgrade.d/upgrade.$current_major_version.first.sh" ] && [ ! -e "./upgrade.d/upgrade.$current_major_version.last.sh" ]; then - source ./upgrade.d/upgrade.last.sh - fi - cp ../conf/$architecture.src.default ../conf/$architecture.src ynh_replace_string --match_string="__VERSION__" --replace_string="$gitlab_version" --target_file="../conf/$architecture.src" ynh_replace_string --match_string="__SOURCE_FILENAME__" --replace_string="$gitlab_filename" --target_file="../conf/$architecture.src"