From 7d701f855f3199a077b8a0f5680c15840e6d0b23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 10 Apr 2023 11:51:41 +0200 Subject: [PATCH] Revert "fix" This reverts commit 95eb3d761fd83d66248ce917b54776b1b1cb7a6b. --- scripts/experimental_helper.sh | 4 ++-- scripts/upgrade | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/experimental_helper.sh b/scripts/experimental_helper.sh index 1c4d621..9f4b973 100644 --- a/scripts/experimental_helper.sh +++ b/scripts/experimental_helper.sh @@ -68,7 +68,7 @@ ynh_handle_app_migration () { ynh_handle_getopts_args "$@" # Get the new app id in the manifest - local new_app_id=$(grep \"id\": ../manifest.toml| cut -d\" -f4) + local new_app_id=$(grep \"id\": ../manifest.json | cut -d\" -f4) if [ $old_app_number -eq 1 ]; then local new_app=$new_app_id else @@ -129,7 +129,7 @@ ynh_handle_app_migration () { local settings_dir="/etc/yunohost/apps" cp -a "$settings_dir/$old_app" "$settings_dir/$new_app" - cp -a ../{scripts,conf,manifest.json} "$settings_dir/$new_app/{scripts,conf,manifest.toml}" + cp -a ../{scripts,conf,manifest.json} "$settings_dir/$new_app" # Replace the old id by the new one ynh_replace_string --match_string="\(^id: .*\)$old_app" --replace_string="\1$new_app" --target_file="$settings_dir/$new_app/settings.yml" diff --git a/scripts/upgrade b/scripts/upgrade index 644825c..c284bda 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -47,7 +47,7 @@ ynh_clean_setup () { ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 # If secret_key doesn't exist, create it -if [[ -z "${secret_key:-}" ]]; then +if [[ -z "$secret_key" ]]; then secret_key=$(ynh_string_random --length=50) ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key fi