From b53fa2f477991243e64a920082b4dbd4fdd31042 Mon Sep 17 00:00:00 2001 From: Anmol Date: Mon, 17 Jul 2017 05:07:27 +0530 Subject: [PATCH] Updated to 2.4.2 and edited upgrade script to retain user data while upgrade --- scripts/install | 1 - scripts/upgrade | 8 +++++++- sources/hubzilla-addons/source_file | 2 +- sources/hubzilla-addons/source_md5 | 2 +- sources/hubzilla-addons/source_url | 2 +- sources/hubzilla/source_file | 2 +- sources/hubzilla/source_md5 | 2 +- sources/hubzilla/source_url | 2 +- 8 files changed, 13 insertions(+), 8 deletions(-) diff --git a/scripts/install b/scripts/install index b34d6b57..51e430b0 100755 --- a/scripts/install +++ b/scripts/install @@ -132,4 +132,3 @@ sudo service php5-fpm reload || true sudo service nginx reload || true sudo yunohost app ssowatconf - diff --git a/scripts/upgrade b/scripts/upgrade index 3c2c061f..94c299c8 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,6 +21,11 @@ run_exec=$(ynh_app_setting_get $app run_exec) CHECK_PATH # Vérifie et corrige la syntaxe du path. +# Make backup of old app folder and create again the app folder +sudo mv ${final_path} ${final_path}.old +sudo mkdir -p $final_path + + # We download the sources and check the md5sum # 1 - hubzilla hubzilla_file=`sudo cat ../sources/hubzilla/source_file`; @@ -28,6 +33,8 @@ sudo wget -nv -i ../sources/hubzilla/source_url -O ${hubzilla_file}.zip sudo md5sum -c ../sources/hubzilla/source_md5 --status || (echo "Corrupt source" >&2 && false) sudo unzip -q ${hubzilla_file}.zip -d ../sources/hubzilla/ sudo cp -r ../sources/hubzilla/${hubzilla_file}/. $final_path +sudo cp -a ${final_path}.old/store ${final_path} +sudo rm -Rf ${final_path}.old # 2 - Addons addons_file=`sudo cat ../sources/hubzilla-addons/source_file`; @@ -95,4 +102,3 @@ fi sudo service php5-fpm reload || true sudo service nginx reload || true sudo yunohost app ssowatconf - diff --git a/sources/hubzilla-addons/source_file b/sources/hubzilla-addons/source_file index 071264fc..30bf3a0c 100644 --- a/sources/hubzilla-addons/source_file +++ b/sources/hubzilla-addons/source_file @@ -1 +1 @@ -hubzilla-addons-2.4 +hubzilla-addons-2.4.1 diff --git a/sources/hubzilla-addons/source_md5 b/sources/hubzilla-addons/source_md5 index 3df4a63b..52dc72f3 100644 --- a/sources/hubzilla-addons/source_md5 +++ b/sources/hubzilla-addons/source_md5 @@ -1 +1 @@ -4a6a825f614af3b49cf1833d8e91009f hubzilla-addons-2.4.zip +aff46da933e40b125c21946ec48220c5 hubzilla-addons-2.4.1.zip diff --git a/sources/hubzilla-addons/source_url b/sources/hubzilla-addons/source_url index 9fafbfd7..bd4e8e73 100644 --- a/sources/hubzilla-addons/source_url +++ b/sources/hubzilla-addons/source_url @@ -1 +1 @@ -https://github.com/redmatrix/hubzilla-addons/archive/2.4.zip +https://github.com/redmatrix/hubzilla-addons/archive/2.4.1.zip diff --git a/sources/hubzilla/source_file b/sources/hubzilla/source_file index e89fa05a..a8366792 100644 --- a/sources/hubzilla/source_file +++ b/sources/hubzilla/source_file @@ -1 +1 @@ -hubzilla-2.4 +hubzilla-2.4.1 diff --git a/sources/hubzilla/source_md5 b/sources/hubzilla/source_md5 index 44e978e2..d7ffed2e 100644 --- a/sources/hubzilla/source_md5 +++ b/sources/hubzilla/source_md5 @@ -1 +1 @@ -a584fd89716eaeda8a879fb288e409e2 hubzilla-2.4.zip +8c824159e5464d9d5cf312a41e50327c hubzilla-2.4.1.zip diff --git a/sources/hubzilla/source_url b/sources/hubzilla/source_url index 2382ee82..14d614fb 100644 --- a/sources/hubzilla/source_url +++ b/sources/hubzilla/source_url @@ -1 +1 @@ -https://github.com/redmatrix/hubzilla/archive/2.4.zip +https://github.com/redmatrix/hubzilla/archive/2.4.1.zip