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