From 353f969322c4cc311783b0da6f85ebfb3a3d9b1a Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Wed, 11 Apr 2018 16:56:16 -0400 Subject: [PATCH] account for patched bones init.lua --- etc/minetestserver-update-from-git.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/etc/minetestserver-update-from-git.sh b/etc/minetestserver-update-from-git.sh index 0fc9fd3..bf2bc67 100644 --- a/etc/minetestserver-update-from-git.sh +++ b/etc/minetestserver-update-from-git.sh @@ -40,10 +40,29 @@ if [ -d "$HOME/Downloads/minetest" ]; then if [ -d "$MY_SUBGAME_PATH" ]; then echo "updating " sudo rsync -rtv "$HOME/Downloads/minetest/games/minetest_game/mods/" "$MY_SUBGAME_PATH/mods/" + if [ -d "$MY_SUBGAME_PATH/mods/tsm_chests_dungeon" ]; then + echo "REMOVING dungeon_loot since tsm_chests_dungeon is installed (even though more than one should work now since https://github.com/minetest/minetest/issues/6590 is resolved, dungeon_loot would be redundant in this case)..." + sudo rm -Rf "$MY_SUBGAME_PATH/mods/dungeon_loot" + fi else echo "skipping update of components from minetest_game since does not exist: " echo " $MY_SUBGAME_PATH" fi + echo "patching bones (this will not be needed after https://github.com/minetest/minetest_game/pull/2082 is merged)..." + if [ -d "$MY_SUBGAME_PATH/mods/bones" ]; then + cd "$MY_SUBGAME_PATH/mods/bones" + if [ -f init.bak ]; then + sudo rm init.bak + fi + if [ -f init.1st ]; then + sudo rm init.1st + fi + sudo mv init.lua init.bak + sudo wget https://github.com/poikilos/minetest_game/raw/master/mods/bones/init.lua + cd "$HOME/Downloads" + else + echo "ERROR: missing '$MY_SUBGAME_PATH/mods/bones'" + fi else echo "WARNING: could not find $MT_GAMES_DIR/minetest_game" fi