From c95fda4ee5c4026c47496dd20cd8ed6d05b07657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 8 Jan 2024 15:10:23 +0100 Subject: [PATCH] fix --- manifest.toml | 5 +++++ scripts/install | 5 ++--- scripts/upgrade | 8 +------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/manifest.toml b/manifest.toml index 2f9b0dd..8daa1d9 100644 --- a/manifest.toml +++ b/manifest.toml @@ -84,6 +84,11 @@ ram.runtime = "50M" sha256 = "2fde8e27144988210b9c0ff1e202905834d9d25aaa63ce452763fd7171096adc" autoupdate.strategy = "latest_github_tag" + [resources.sources.capturetheflag] + url = "https://github.com/MT-CTF/capturetheflag/archive/refs/tags/v3.7.tar.gz" + sha256 = "d81f4277761a072f0516e1363e7fa171a9f25b55d4c5f2e0114544fa8f9df99d" + autoupdate.strategy = "latest_github_tag" + [resources.system_user] [resources.install_dir] diff --git a/scripts/install b/scripts/install index c98dade..90b59b8 100755 --- a/scripts/install +++ b/scripts/install @@ -26,9 +26,8 @@ ynh_script_progression --message="Building Minetest..." # Install the game if [ $game = "capturetheflag" ]; then - pushd $install_dir - git clone --recursive https://github.com/MT-CTF/capturetheflag.git games/capturetheflag - popd + # Download Capture The Flag + ynh_setup_source --dest_dir=$install_dir/games/capturetheflag --source_id=capturetheflag else # Download Minetest Game ynh_setup_source --dest_dir=$install_dir/games/minetest_game --source_id=minetest_game diff --git a/scripts/upgrade b/scripts/upgrade index dc4c801..a94e8ed 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -60,13 +60,7 @@ ynh_script_progression --message="Building Minetest..." # Install the game if [ $game = "capturetheflag" ]; then # Download Capture The Flag - - pushd $install_dir - # To avoid mess remove this first - ynh_secure_remove games/capturetheflag/ - # Then clone the latest version from git - git clone --recursive https://github.com/MT-CTF/capturetheflag.git games/capturetheflag - popd + ynh_setup_source --dest_dir=$install_dir/games/capturetheflag --source_id=capturetheflag else # Download Minetest Game ynh_setup_source --dest_dir=$install_dir/games/minetest_game --source_id=minetest_game