From a7f076306f13007185c26a18774ab19b66c03421 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 18 May 2021 03:14:18 +0200 Subject: [PATCH] Fix WARNING grep: ../conf/minetest_game.src: No such file or directory --- scripts/install | 18 +++++++++--------- scripts/upgrade | 20 +++++++++++--------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/scripts/install b/scripts/install index acd0eb2..0a5751e 100755 --- a/scripts/install +++ b/scripts/install @@ -131,21 +131,21 @@ ynh_add_systemd_config #================================================= ynh_script_progression --message="Building Minetest..." -# Compile Minetest -pushd /opt/yunohost/$app - # Install the game - if [ $game = "capturetheflag" ]; then +# Install the game +if [ $game = "capturetheflag" ]; then + pushd $final_path git clone --recursive https://github.com/MT-CTF/capturetheflag.git games/capturetheflag - else - # Download Minetest Game - ynh_setup_source --dest_dir=/opt/yunohost/$app/games/minetest_game --source_id=minetest_game - fi + popd +else + # Download Minetest Game + ynh_setup_source --dest_dir=$final_path/games/minetest_game --source_id=minetest_game +fi +pushd $final_path cmake . -DRUN_IN_PLACE=TRUE -DENABLE_LUAJIT=TRUE -DBUILD_CLIENT=FALSE -DBUILD_SERVER=TRUE make -j$(nproc) - popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 4eb9921..438c1eb 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -141,24 +141,26 @@ fi # SPECIFIC UPGRADE #================================================= # Compile Minetest -pushd /opt/yunohost/$app - # Install the game - if [ $game = "capturetheflag" ]; then - # Download Capture The Flag +# Install the game +if [ $game = "capturetheflag" ]; then + # Download Capture The Flag + + pushd $final_path # 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 - else - # Download Minetest Game - ynh_setup_source --dest_dir=/opt/yunohost/$app/games/minetest_game --source_id=minetest_game - fi + popd +else + # Download Minetest Game + ynh_setup_source --dest_dir=$final_path/games/minetest_game --source_id=minetest_game +fi +pushd $final_path cmake . -DRUN_IN_PLACE=TRUE -DENABLE_LUAJIT=TRUE -DBUILD_CLIENT=FALSE -DBUILD_SERVER=TRUE make -j$(nproc) - popd #=================================================