From 65a3f41081012465df4430c0becc415e6f4ce125 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 8 Jan 2020 20:29:23 +0100 Subject: [PATCH] Removing sources before upgrading sources --- scripts/upgrade | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 79bd061..e39d226 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -115,8 +115,16 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_print_info --message="Upgrading source files..." + config_file="$final_path/config.yml" + tmpdir="$(mktemp -d)" + + rsync -a "$config_file" "$tmpdir/." + ynh_secure_remove --file="$final_path" + # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" + + rsync -a "$tmpdir/config.yml" "$final_path/." fi #=================================================