From cfb346dce799dd5f78da0cda4b8ae1ed3b5e0134 Mon Sep 17 00:00:00 2001 From: Kayou Date: Thu, 1 Aug 2024 14:51:04 +0200 Subject: [PATCH] install: select between latest or oldstable version --- scripts/install | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 0987b84..b36fb31 100755 --- a/scripts/install +++ b/scripts/install @@ -23,8 +23,15 @@ ynh_script_progression --message="Setting up source files..." --weight=5 # Enable YunoHost patches on Nextcloud sources cp -a ../sources/patches_last_version/* ../sources/patches + +source_id="main" +if [ "$version_to_follow" == "oldstable" ]; then + last_version=$(ynh_read_manifest --manifest_key="resources.sources.main.url" | grep -o '[0-9][0-9]\.[0-9]\.[0-9]') + last_major_version=${last_version%%.*} + source_id=$((last_major_version--)) +fi # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$install_dir" +ynh_setup_source --dest_dir="$install_dir" --source_id="$source_id" #================================================= # PHP-FPM CONFIGURATION