From 7104748a896c05c2b5874bb9f05db509aae0c441 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Sun, 20 May 2018 15:49:02 +0200 Subject: [PATCH] Fix upgrade --- conf/app.src | 2 ++ scripts/upgrade | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/conf/app.src b/conf/app.src index 4b11423..23172c3 100644 --- a/conf/app.src +++ b/conf/app.src @@ -2,3 +2,5 @@ SOURCE_URL=http://download.tuxfamily.org/galette/galette-0.9.tar.bz2 SOURCE_SUM=139a5143c0f0d777e69e18633e9b751d1e50b45b9be05320eac00fd2bb685645 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.bz2 +SOURCE_IN_SUBDIR=true +SOURCE_FILENAME= diff --git a/scripts/upgrade b/scripts/upgrade index be4ac02..c4af054 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,10 +83,16 @@ path_url=$(ynh_normalize_url_path "$path_url") #================================================= # Download, check integrity, uncompress and patch the source from app.src +mv "$final_path" "$final_path.old" + ynh_setup_source "$final_path" -mv --force "$final_path"/galette/* "$final_path"/ +mv "$final_path"/galette/* "$final_path"/ ynh_secure_remove "$final_path"/tests -chown -R root:root "$final_path" + +cp "$final_path.old/config/config.inc.php" "$final_path/config/config.inc.php" + +# delete temp directory +ynh_secure_remove "$final_path.old" #================================================= # NGINX CONFIGURATION