From f0ac32ddedb7fbe6719972ba245f3dfc78f09915 Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Wed, 7 Feb 2018 14:34:04 -0500 Subject: [PATCH] update for spawners change from mod to modpack and shell function for install script --- README.md | 19 +- .../game-install-ENLIVEN | 847 +++++++----------- etc/game-install-enliven-testing.sh | 216 +++-- mtsenliven.py | 100 ++- .../cme_to_spawners-0.4.15-git/README.txt | 11 + .../cme_to_spawners-0.4.15-git/depends.txt | 6 + .../cme_to_spawners-0.4.15-git/init.lua | 59 ++ .../mods-stopgap/cme_to_spawners/depends.txt | 2 +- patches/mods-stopgap/cme_to_spawners/init.lua | 18 +- .../spawners_to_spawners_mobs/README.txt | 11 + .../spawners_to_spawners_mobs/depends.txt | 6 + .../spawners_to_spawners_mobs/init.lua | 13 + 12 files changed, 636 insertions(+), 672 deletions(-) create mode 100644 patches/mods-deprecated/cme_to_spawners-0.4.15-git/README.txt create mode 100644 patches/mods-deprecated/cme_to_spawners-0.4.15-git/depends.txt create mode 100644 patches/mods-deprecated/cme_to_spawners-0.4.15-git/init.lua create mode 100644 patches/mods-stopgap/spawners_to_spawners_mobs/README.txt create mode 100644 patches/mods-stopgap/spawners_to_spawners_mobs/depends.txt create mode 100644 patches/mods-stopgap/spawners_to_spawners_mobs/init.lua diff --git a/README.md b/README.md index 7c072f4..96db40a 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,19 @@ ENLIVEN is a subgame for minetest with the goals of providing immersion and less * birthstones, improved fork: ### Planned Features -* trm_pyramids * see also EnlivenMinetest/etc/game-install-enliven-testing.sh +#### Possible Additions +* https://github.com/minetest-mods/woodcutting/archive/master.zip + (sneek click to start auto-harvest tree, sneak again to cancel) +* subterrane: fork of Caverealms, but is just an API and needs other mods to generate anything +* craftguide +* privilegeareas: Privileges granted depending on areas -- https://github.com/minetest-mods/privilegeareas/archive/master.zip + + #### Shell Script Deprecation Process ##### Goals * Remove anything running as root, by running as user in web server group - ##### Finished * etc/change_hardcoded_world_name_first/mts-ENLIVEN deprecated by mtsenliven.py @@ -75,6 +81,15 @@ Otherwise just install everything EXCEPT cme_to_spawners & tsm_pyramids_to_spawn * fix exception while trying to recover from exception (see `Could not finish writing r`) ## Changes: +(2018-02-08) +* trm_pyramids added (partial code in game-install-ENLIVEN completed) + (a required treasure table so tsm_pyramids can provide treasure in pyramids) +* switched links to use minetest-mods' versions of: + * throwing (now is an api only so ENLIVEN also installs minetest-mods/throwing_arrows) + * pipeworks +* added anvil mod +* added sling mod (throw any item or stack using sling--accounts for multiplayer) + (2018-02-06) * refactored file structure * renamed games/ENLIVEN to patches/subgame diff --git a/etc/change_hardcoded_world_name_first/game-install-ENLIVEN b/etc/change_hardcoded_world_name_first/game-install-ENLIVEN index f4c6d11..08ecaa2 100755 --- a/etc/change_hardcoded_world_name_first/game-install-ENLIVEN +++ b/etc/change_hardcoded_world_name_first/game-install-ENLIVEN @@ -17,13 +17,21 @@ # sudo find -name 'worlds' (worlds folder is in $HOME/.minetest) # sudo find -name 'minimal' (stable build [such as 0.4.9 games folder is /usr/share/games/minetest/games, but git version games folder is /usr/local/share/minetest/games) -# Absolute path to this script, e.g. /home/user/bin/foo.sh -SCRIPT=$(readlink -f "$0") -# Absolute path this script is in, thus /home/user/bin -SCRIPTPATH=$(dirname "$SCRIPT") -REPO_PATH=$(dirname "$SCRIPTPATH") -#endregion paste this part into terminal to get some great environment variables + + + +#region paste this part into terminal to get some great environment variables +if [ "$0" = "-bash" ]; then + echo "you must have pasted this into terminal, so assuming REPO_PATH" + REPO_PATH="$HOME/GitHub/EnlivenMinetest" + echo "$REPO_PATH" +else + SCRIPT=$(readlink -f "$0") + # Absolute path this script is in, thus /home/user/bin + SCRIPTPATH=$(dirname "$SCRIPT") + REPO_PATH=$(dirname "$SCRIPTPATH") +fi PATCHES_PATH="$REPO_PATH/patches" @@ -41,6 +49,7 @@ if [ ! -d "$PATCHES_PATH" ]; then fi if [ ! -d "$PATCHES_PATH" ]; then echo "ERROR: could not find patches such as in $PATCHES_PATH" + sleep 3 exit 1 fi # NOTE: minetest mods (other than 0.4.16 client-side mods) are ALWAYS ONLY installed on server, unless you need them for singleplayer @@ -70,10 +79,43 @@ MT_MYGAME_MODS_PATH=$MT_MYGAME_DIR/mods MT_MYWORLD_NAME=FCAGameAWorld MT_MYWORLD_DIR=$HOME/.minetest/worlds/$MT_MYWORLD_NAME err_txt=$HOME/err-enliven.txt - +# see also https://www.shellscript.sh/functions.html +add_regular_mod() +{ + cd $HOME/Downloads + MTMOD_UNZ_NAME=$1 + MTMOD_DEST_NAME=$2 + URL=$3 + MTMOD_SRC_ZIP=$MTMOD_DEST_NAME.zip + MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME + if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME + fi + if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP + fi + if [ -d "$MTMOD_DEST_PATH" ]; then + sudo rm -Rf "$MTMOD_DEST_PATH" + fi + wget -O $MTMOD_SRC_ZIP $URL + unzip "$MTMOD_SRC_ZIP" + sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" + sudo rm -Rf "$MTMOD_DEST_PATH/etc" + if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo " ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt + cat $err_txt + sleep 3 + exit 1 + else + echo " added as $MTMOD_DEST_PATH" + fi +} #endregion paste this part into terminal to get some great environment variables + + + # BACKUP THE WORLD: sudo chown $USER "$MT_MYWORLD_DIR/world.mt" sudo chown $USER "$MT_MYWORLD_DIR/world.mt.1st" @@ -120,6 +162,7 @@ fi if [ ! -d "$MT_MYGAME_DIR/" ]; then echo "ERROR: failed to create $MT_MYGAME_DIR, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi #sudo cp -R $USR_SHARE_MINETEST/games/$mtgame_name/mods/* "$MT_MYGAME_DIR/mods/" @@ -160,6 +203,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi echo "load_mod_mobs = true" >> "$MT_MYWORLD_DIR/world.mt" @@ -187,6 +231,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi echo "load_mod_mobs_monster = true" >> "$MT_MYWORLD_DIR/world.mt" @@ -211,6 +256,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi echo "load_mod_mobs_animal = true" >> "$MT_MYWORLD_DIR/world.mt" @@ -247,6 +293,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -305,6 +352,7 @@ sudo mv $MTMOD_DEST_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -332,6 +380,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi echo "load_mod_areas = true" >> "$MT_MYWORLD_DIR/world.mt" @@ -372,9 +421,9 @@ fi #MTMOD_DEST_NAME=carbone-ng ##MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME #MTMOD_DEST_PATH=$MT_GAMES_DIR/$MTMOD_DEST_NAME -##if [ -d "$MTMOD_UNZ_NAME" ]; then -#rm -Rf $MTMOD_UNZ_NAME -##fi +#if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable +# rm -Rf $MTMOD_UNZ_NAME +#fi #if [ -f "$MTMOD_DL_ZIP" ]; then # rm -f "$MTMOD_DL_ZIP" #fi @@ -389,6 +438,7 @@ fi #if [ ! -d "$MTMOD_DEST_PATH" ]; then # echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt # cat $err_txt +# sleep 3 # exit 1 #fi @@ -419,27 +469,30 @@ fi #sudo rm -Rf $MT_MYGAME_MODS_PATH/farming #sudo cp -R $USR_SHARE_MINETEST/games/$mtgame_name/mods/farming $MT_MYGAME_MODS_PATH/farming -MTMOD_DL_ZIP=master.zip +# MTMOD_DL_ZIP=master.zip MTMOD_SRC_ZIP=unified_inventory.zip MTMOD_UNZ_NAME=unified_inventory-master MTMOD_DEST_NAME=unified_inventory MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME +fi if [ -f "$MTMOD_DL_ZIP" ]; then rm -f "$MTMOD_DL_ZIP" fi if [ -f "$MTMOD_SRC_ZIP" ]; then rm -f "$MTMOD_SRC_ZIP" fi -wget https://github.com/minetest-technic/unified_inventory/archive/master.zip -mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +# wget -O $MTMOD_SRC_ZIP https://github.com/minetest-technic/unified_inventory/archive/master.zip +# (link above forewards to minetest-mods now) +wget -O $MTMOD_SRC_ZIP https://github.com/minetest-mods/unified_inventory/archive/master.zip +# mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP unzip $MTMOD_SRC_ZIP sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi echo "load_mod_unified_inventory = true" >> $MT_MYWORLD_DIR/world.mt @@ -450,9 +503,9 @@ MTMOD_SRC_ZIP=technic.zip MTMOD_UNZ_NAME=technic-master MTMOD_DEST_NAME=technic MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME +fi if [ -f "$MTMOD_DL_ZIP" ]; then rm -f "$MTMOD_DL_ZIP" fi @@ -460,7 +513,7 @@ if [ -f "$MTMOD_SRC_ZIP" ]; then rm -f "$MTMOD_SRC_ZIP" fi if [ -d "$MTMOD_DEST_PATH" ]; then - rm -Rf "$MTMOD_DEST_PATH" + sudo rm -Rf "$MTMOD_DEST_PATH" fi #wget https://github.com/minetest-technic/technic/archive/master.zip wget https://github.com/minetest-mods/technic/archive/master.zip @@ -470,6 +523,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi echo "load_mod_technic = true" >> $MT_MYWORLD_DIR/world.mt @@ -506,9 +560,9 @@ fi if [ -d "tsm_default_example" ]; then rm -Rf "tsm_default_example" fi -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME +fi if [ -f "$MTMOD_DL_ZIP" ]; then rm -f "$MTMOD_DL_ZIP" fi @@ -521,6 +575,7 @@ sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi echo "load_mod_treasurer = true" >> $MT_MYWORLD_DIR/world.mt @@ -532,9 +587,9 @@ echo "load_mod_treasurer = true" >> $MT_MYWORLD_DIR/world.mt #MTMOD_UNZ_NAME=tsm_pyramids-* #MTMOD_DEST_NAME=tsm_pyramids #MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -##if [ -d "$MTMOD_UNZ_NAME" ]; then -#rm -Rf $MTMOD_UNZ_NAME -##fi +#if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable +# rm -Rf $MTMOD_UNZ_NAME +#fi #if [ -f "$MTMOD_DL_ZIP" ]; then # rm -f "$MTMOD_DL_ZIP" #fi @@ -548,17 +603,39 @@ echo "load_mod_treasurer = true" >> $MT_MYWORLD_DIR/world.mt #if [ ! -d "$MTMOD_DEST_PATH" ]; then # echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt # cat $err_txt +# sleep 3 # exit 1 #fi -cd "$HOME/Downloads" -MTMOD_DL_ZIP=akiba-* -wget http://git.akiba.fr:81/minetest/akiba/repository/archive.zip?ref=af571404a27a2cb06842c644930344f565a0b786 -rm -f $MTMOD_DL_ZIP +#an old version of worldedit included in a minetest fork last updated 2016: +#MTMOD_DL_ZIP=akiba-* +#wget http://git.akiba.fr:81/minetest/akiba/repository/archive.zip?ref=af571404a27a2cb06842c644930344f565a0b786 +#rm -f $MTMOD_DL_ZIP + +cd "$HOME/Downloads" +MTMOD_DEST_NAME=trm_pyramids +MTMOD_UNZ_NAME=trm_pyramids +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf "$MTMOD_UNZ_NAME" +fi +mkdir "$MTMOD_UNZ_NAME" +cd "$MTMOD_UNZ_NAME" wget https://github.com/MinetestForFun/server-minetestforfun/raw/master/mods/trm_pyramids/depends.txt wget https://github.com/MinetestForFun/server-minetestforfun/raw/master/mods/trm_pyramids/init.lua wget https://github.com/MinetestForFun/server-minetestforfun/raw/master/mods/trm_pyramids/more_trms.lua +wget https://github.com/MinetestForFun/server-minetestforfun/blob/master/LICENSE +if [ -d "$MTMOD_DEST_PATH" ]; then + sudo rm -Rf "$MTMOD_DEST_PATH" +fi +sudo mkdir "$MTMOD_DEST_PATH" +sudo mv -f depends.txt "$MTMOD_DEST_PATH/" +sudo mv -f init.lua "$MTMOD_DEST_PATH/" +sudo mv -f more_trms.lua "$MTMOD_DEST_PATH/" +sudo mv -f LICENSE "$MTMOD_DEST_PATH/" +cd .. +rmdir "$MTMOD_UNZ_NAME" #Wuzzy's hudbars (no builtin bars; used by sprint, hbhunger, and hbarmor) https://forum.minetest.net/viewtopic.php?f=11&t=11153&hilit=hunger cd $HOME/Downloads @@ -567,9 +644,9 @@ cd $HOME/Downloads MTMOD_UNZ_NAME=minetest_hudbars MTMOD_DEST_NAME=hudbars MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable rm -Rf $MTMOD_UNZ_NAME -#fi +fi #if [ -f $MTMOD_DL_ZIP ]; then # rm -f $MTMOD_DL_ZIP #fi @@ -585,6 +662,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -629,6 +707,7 @@ sudo mv "$MTMOD_DEST_PATH/hunger/init_(nosprint).lua" "$MTMOD_DEST_PATH/hunger/i if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi # END IF no hudbars mod @@ -645,9 +724,9 @@ cd $HOME/Downloads MTMOD_UNZ_NAME=minetest_hbarmor MTMOD_DEST_NAME=hbarmor MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME +fi #if [ -f $MTMOD_DL_ZIP ]; then # rm -f $MTMOD_DL_ZIP #fi @@ -663,6 +742,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -673,9 +753,9 @@ cd $HOME/Downloads MTMOD_UNZ_NAME=minetest_hbhunger MTMOD_DEST_NAME=hbhunger MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME +fi #if [ -f $MTMOD_DL_ZIP ]; then # rm -f $MTMOD_DL_ZIP #fi @@ -691,12 +771,13 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi cd "$HOME/Downloads" -MTMOD_DL_ZIP=master.zip +# MTMOD_DL_ZIP=master.zip MTMOD_SRC_ZIP=moreblocks.zip MTMOD_UNZ_NAME=moreblocks-master MTMOD_DEST_NAME=moreblocks @@ -710,39 +791,41 @@ fi if [ -f "moreblocks.zip" ]; then rm moreblocks.zip fi -#wget https://gitorious.com/calinou/moreblocks/archive/master.zip -wget https://github.com/minetest-mods/moreblocks/archive/master.zip -mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +# wget https://gitorious.com/calinou/moreblocks/archive/master.zip +wget -O $MTMOD_SRC_ZIP https://github.com/minetest-mods/moreblocks/archive/master.zip +# mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP unzip $MTMOD_SRC_ZIP sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi -MTMOD_DL_ZIP=master.zip MTMOD_SRC_ZIP=pipeworks.zip MTMOD_UNZ_NAME=pipeworks-master MTMOD_DEST_NAME=pipeworks MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -if [ -d "$MTMOD_UNZ_NAME" ]; then +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable rm -Rf "$MTMOD_UNZ_NAME" fi -if [ -f "$MTMOD_DL_ZIP" ]; then - rm -f "$MTMOD_DL_ZIP" -fi if [ -f "$MTMOD_SRC_ZIP" ]; then rm -f "$MTMOD_SRC_ZIP" fi -wget https://github.com/VanessaE/pipeworks/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +#wget -O $MTMOD_SRC_ZIP https://github.com/VanessaE/pipeworks/archive/master.zip +wget -O $MTMOD_SRC_ZIP https://github.com/minetest-mods/pipeworks/archive/master.zip unzip "$MTMOD_SRC_ZIP" +if [ -d "$MTMOD_DEST_PATH" ]; then + echo "removing old $MTMOD_DEST_PATH" + sudo rm -Rf "$MTMOD_DEST_PATH" +fi sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -752,11 +835,11 @@ MTMOD_SRC_ZIP=plantlife_modpack.zip MTMOD_UNZ_NAME=plantlife_modpack-master MTMOD_DEST_NAME=plantlife_modpack MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -if [ -d "$MTMOD_UNZ_NAME" ]; then +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable rm -Rf "$MTMOD_UNZ_NAME" fi if [ -d "$MTMOD_DEST_PATH" ]; then - rm -Rf "$MTMOD_DEST_PATH" + sudo rm -Rf "$MTMOD_DEST_PATH" fi if [ -f "$MTMOD_DL_ZIP" ]; then rm -f "$MTMOD_DL_ZIP" @@ -771,6 +854,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -784,7 +868,7 @@ MTMOD_SRC_ZIP=lapis_Napiophelios.zip MTMOD_UNZ_NAME=LapisLazuli-master MTMOD_DEST_NAME=lapis MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -if [ -d "$MTMOD_UNZ_NAME" ]; then +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable rm -Rf "$MTMOD_UNZ_NAME" fi if [ -f "$MTMOD_DL_ZIP" ]; then @@ -800,6 +884,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -826,7 +911,7 @@ MTMOD_SRC_ZIP=biome_lib.zip MTMOD_UNZ_NAME=biome_lib-master MTMOD_DEST_NAME=biome_lib MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -if [ -d "$MTMOD_UNZ_NAME" ]; then +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable rm -Rf "$MTMOD_UNZ_NAME" fi if [ -f "$MTMOD_DL_ZIP" ]; then @@ -842,6 +927,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -850,7 +936,7 @@ MTMOD_SRC_ZIP=moretrees.zip MTMOD_UNZ_NAME=moretrees-master MTMOD_DEST_NAME=moretrees MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -if [ -d "$MTMOD_UNZ_NAME" ]; then +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable rm -Rf "$MTMOD_UNZ_NAME" fi if [ -f "$MTMOD_DL_ZIP" ]; then @@ -866,6 +952,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -875,11 +962,11 @@ MTMOD_SRC_ZIP=minetest-3d_armor.zip MTMOD_UNZ_NAME=minetest-3d_armor-master MTMOD_DEST_NAME=3d_armor MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -if [ -d "$MTMOD_UNZ_NAME" ]; then +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable rm -Rf "$MTMOD_UNZ_NAME" fi if [ -d "$MTMOD_DEST_PATH" ]; then - rm -Rf "$MTMOD_DEST_PATH" + sudo rm -Rf "$MTMOD_DEST_PATH" fi if [ -f "$MTMOD_DL_ZIP" ]; then rm -f "$MTMOD_DL_ZIP" @@ -894,6 +981,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi #mv minetest-3d_armor-master minetest-3d_armor_MODPACK @@ -911,11 +999,11 @@ MTMOD_SRC_ZIP=caverealms.zip MTMOD_UNZ_NAME=minetest-caverealms-master MTMOD_DEST_NAME=caverealms MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -if [ -d "$MTMOD_UNZ_NAME" ]; then +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable rm -Rf "$MTMOD_UNZ_NAME" fi if [ -d "$MTMOD_DEST_PATH" ]; then - rm -Rf "$MTMOD_DEST_PATH" + sudo rm -Rf "$MTMOD_DEST_PATH" fi if [ -f "$MTMOD_DL_ZIP" ]; then rm -f "$MTMOD_DL_ZIP" @@ -930,6 +1018,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -949,7 +1038,7 @@ MTMOD_SRC_ZIP=moreores.zip MTMOD_UNZ_NAME=moreores-master MTMOD_DEST_NAME=moreores MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -if [ -d "$MTMOD_UNZ_NAME" ]; then +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable rm -Rf "$MTMOD_UNZ_NAME" fi if [ -f "$MTMOD_DL_ZIP" ]; then @@ -965,6 +1054,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -973,7 +1063,7 @@ MTMOD_SRC_ZIP=sprint.zip MTMOD_UNZ_NAME=sprint-master MTMOD_DEST_NAME=sprint MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -if [ -d "$MTMOD_UNZ_NAME" ]; then +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable rm -Rf "$MTMOD_UNZ_NAME" fi if [ -f "$MTMOD_DL_ZIP" ]; then @@ -990,6 +1080,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -1010,32 +1101,26 @@ fi cd "$HOME/Downloads" #does NOT have a zip extension when downloaded via wget: -MTMOD_DL_ZIP=master.zip MTMOD_SRC_ZIP=mesecons_modpack.zip MTMOD_UNZ_NAME=mesecons-master MTMOD_DEST_NAME=mesecons MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi -rm -Rf minetest-mods-mesecons-* -rm -Rf "" -if [ -f "$MTMOD_DL_ZIP" ]; then - rm -f "$MTMOD_DL_ZIP" +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME fi if [ -f "$MTMOD_SRC_ZIP" ]; then rm -f "$MTMOD_SRC_ZIP" fi -wget https://github.com/minetest-mods/mesecons/archive/master.zip -mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +wget -O $MTMOD_SRC_ZIP https://github.com/minetest-mods/mesecons/archive/master.zip unzip $MTMOD_SRC_ZIP if [ -d "$MTMOD_DEST_PATH" ]; then - rm -Rf "$MTMOD_DEST_PATH" + sudo rm -Rf "$MTMOD_DEST_PATH" fi sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to create $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -1056,9 +1141,9 @@ MTMOD_SRC_ZIP=boost_cart.zip MTMOD_UNZ_NAME=boost_cart-master MTMOD_DEST_NAME=boost_cart MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME +fi if [ -f "$MTMOD_DL_ZIP" ]; then rm -f "$MTMOD_DL_ZIP" fi @@ -1066,7 +1151,7 @@ if [ -f "$MTMOD_SRC_ZIP" ]; then rm -f "$MTMOD_SRC_ZIP" fi if [ -d "$MTMOD_DEST_PATH" ]; then - rm -Rf "$MTMOD_DEST_PATH" + sudo rm -Rf "$MTMOD_DEST_PATH" fi wget https://github.com/SmallJoker/boost_cart/archive/master.zip mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" @@ -1076,50 +1161,77 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi cd "$HOME/Downloads" #MTMOD_DL_ZIP=archive.zip -MTMOD_DL_ZIP=master.zip #MTMOD_SRC_ZIP=throwing_Echoes91.zip -MTMOD_SRC_ZIP=throwing_MinetestForFun.zip -MTMODPACK_UNZ_NAME=server-minetestforfun-master -MTMOD_UNZ_NAME=server-minetestforfun-master/mods/throwing +#MTMOD_SRC_ZIP=throwing_MinetestForFun.zip +MTMOD_SRC_ZIP=throwing_minetest-mods.zip +#MTMODPACK_UNZ_NAME=server-minetestforfun-master +MTMOD_UNZ_NAME=throwing-master MTMOD_DEST_NAME=throwing MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME if [ -d "$MTMOD_DEST_PATH" ]; then echo "Removing old version of throwing..." sudo rm -Rf $MTMOD_DEST_PATH fi -echo "Installing MinetestForFun's PvP fork of Echoes91's (NOT Echoes91's Throwing enhanced NOT PilzAdam's NOT Jeija's) Throwing " +#echo "Installing MinetestForFun's PvP fork of Echoes91's (NOT Echoes91's Throwing enhanced NOT PilzAdam's NOT Jeija's) Throwing " if [ -f "throwing_Echoes91.zip" ]; then rm throwing_Echoes91.zip fi -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi -if [ -d "$MTMODPACK_UNZ_NAME" ]; then - rm -Rf $MTMODPACK_UNZ_NAME -fi -if [ -f "$MTMOD_DL_ZIP" ]; then - rm -f "$MTMOD_DL_ZIP" +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME fi +#if [ -d "$MTMODPACK_UNZ_NAME" ]; then +# rm -Rf $MTMODPACK_UNZ_NAME +#fi if [ -f "$MTMOD_SRC_ZIP" ]; then rm -f "$MTMOD_SRC_ZIP" fi -#wget https://github.com/PilzAdam/throwing/zipball/master -#wget https://gitlab.com/echoes91/throwing/repository/archive.zip -wget https://github.com/MinetestForFun/server-minetestforfun/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +#wget -O $MTMOD_SRC_ZIP https://github.com/PilzAdam/throwing/zipball/master +#wget -O $MTMOD_SRC_ZIP https://gitlab.com/echoes91/throwing/repository/archive.zip +#wget -O $MTMOD_SRC_ZIP https://github.com/MinetestForFun/server-minetestforfun/archive/master.zip +wget -O $MTMOD_SRC_ZIP https://github.com/minetest-mods/throwing/archive/master.zip +echo "Installing minetest-mods' (NOT MinetestForFun's PvP fork of Echoes91's, NOT Echoes91's Throwing enhanced NOT PilzAdam's NOT Jeija's) Throwing " +#mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt + cat $err_txt + sleep 3 + exit 1 +fi + +cd $HOME/Downloads +MTMOD_SRC_ZIP=throwing_arrows.zip +MTMOD_UNZ_NAME=throwing_arrows-master +MTMOD_DEST_NAME=throwing_arrows +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +if [ -d "$MTMOD_DEST_PATH" ]; then + sudo rm -Rf "$MTMOD_DEST_PATH" +fi +wget -O $MTMOD_SRC_ZIP https://github.com/minetest-mods/throwing_arrows/archive/master.zip unzip "$MTMOD_SRC_ZIP" sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +sudo rm -Rf "$MTMOD_DEST_PATH/etc" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi + cd "$HOME/Downloads" #MTMOD_DL_ZIP=* MTMOD_SRC_ZIP=tsm_mines.zip @@ -1153,6 +1265,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -1186,6 +1299,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -1197,9 +1311,9 @@ MTMOD_DEST_NAME=fishing MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME echo "Installing Minetestforfun's (NOT wulfsdad's) fishing " echo "Installing Minetestforfun's (NOT wulfsdad's) fishing " >> $MTMOD_SRC_ZIP.txt -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME +fi if [ -f $MTMOD_DL_ZIP ]; then rm -f $MTMOD_DL_ZIP fi @@ -1213,6 +1327,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -1224,9 +1339,9 @@ MTMOD_DEST_NAME=compassgps MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME echo "Installing Kilarin's compassgps (NOT TeTpaAka, nor Echo, nor PilzAdam compass) " echo "Installing Kilarin's compassgps (NOT TeTpaAka, nor Echo, nor PilzAdam compass) " >> $MTMOD_SRC_ZIP.txt -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME +fi if [ -f $MTMOD_DL_ZIP ]; then rm -f $MTMOD_DL_ZIP fi @@ -1240,6 +1355,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -1250,9 +1366,9 @@ MTMOD_DEST_NAME=whitelist MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME echo "Installing ShadowNinja's whitelist " echo "Installing ShadowNinja's whitelist " >> $MTMOD_SRC_ZIP.txt -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME +fi if [ -f $MTMOD_DL_ZIP ]; then rm -f $MTMOD_DL_ZIP fi @@ -1266,6 +1382,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -1302,9 +1419,9 @@ sudo mv minetest_playereffects "$MTMOD_DEST_PATH" #MTMOD_UNZ_NAME=monoidal_effects-master #MTMOD_DEST_NAME=monoidal_effects #MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -##if [ -d "$MTMOD_UNZ_NAME" ]; then -#rm -Rf $MTMOD_UNZ_NAME -##fi +#if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable +# rm -Rf $MTMOD_UNZ_NAME +#fi #if [ -f $MTMOD_DL_ZIP ]; then # rm -f $MTMOD_DL_ZIP #fi @@ -1318,6 +1435,7 @@ sudo mv minetest_playereffects "$MTMOD_DEST_PATH" #if [ ! -d "$MTMOD_DEST_PATH" ]; then # echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt # cat $err_txt +# sleep 3 # exit 1 #fi @@ -1327,9 +1445,9 @@ MTMOD_SRC_ZIP=player_monoids.zip MTMOD_UNZ_NAME=player_monoids-master MTMOD_DEST_NAME=player_monoids MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME +fi if [ -f $MTMOD_DL_ZIP ]; then rm -f $MTMOD_DL_ZIP fi @@ -1343,6 +1461,7 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -1366,237 +1485,77 @@ wget https://github.com/Uberi/MineTest-WorldEdit/zipball/master mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" unzip "$MTMOD_SRC_ZIP" if [ -d "$MTMOD_DEST_PATH" ]; then - rm -Rf "$MTMOD_DEST_PATH" -fi -sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" -if [ ! -d "$MTMOD_DEST_PATH" ]; then - echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt - cat $err_txt - exit 1 -fi - - -cd "$HOME/Downloads" -MTMOD_DL_ZIP=master.zip -MTMOD_SRC_ZIP=u_skins.zip -MTMOD_UNZ_NAME=minetest-u_skinsdb-master -MTMOD_DEST_NAME=u_skins -MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP -fi -if [ -f $MTMOD_SRC_ZIP ]; then - rm -f $MTMOD_SRC_ZIP + sudo rm -Rf "$MTMOD_DEST_PATH" fi -rm -Rvf $MTMOD_UNZ_NAME -# NOTE: a skin database is at http://minetest.fensta.bplaced.net/ -# bell07's 2016 (FORK of Krock's fork of dmonty's) u_skins (u_skins is a skin GUI that works with unified_inventory, whereas other skin GUIs often use inventory++) -# Krock's is outdated and has remaining bugs such as in updater: wget https://github.com/SmallJoker/minetest-u_skinsdb/archive/master.zip -# bell07's no longer exists -# wget https://github.com/bell07/minetest-u_skinsdb/archive/master.zip -wget https://github.com/dmonty2/minetest-u_skinsdb/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" -unzip "$MTMOD_SRC_ZIP" sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi -# Update skins database: -#(jq is a json processor, required for the updater bash script:) -sudo apt-get -y install jq -cd "$MTMOD_DEST_PATH" -# cd u_skins #bell07's version is a mod, not a modpack -cd updater - -# Only download entire skins database if you -# REALLY, REALLY MEAN IT: -# ./update_skins_db.sh -# (note, bell07 has the fixed bash script, but the python3 script is still bugged as of 2016-01-29, and the .NET assembly seems to only work for Windows (has meta directory not found error on mono for Linux) - #MarkBu's ambience/ambiance ambient sounds (burli on https://forum.minetest.net/viewtopic.php?f=9&t=14814 ) -#cd "$HOME/Downloads" -#MTMOD_DL_ZIP=master.zip -#MTMOD_SRC_ZIP=ambianceplus.zip -#MTMOD_UNZ_NAME=ambianceplus-master -#MTMOD_DEST_NAME=ambianceplus -#MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -f $MTMOD_DL_ZIP ]; then -# rm -f $MTMOD_DL_ZIP -#fi -#if [ -f $MTMOD_SRC_ZIP ]; then -# rm -f $MTMOD_SRC_ZIP -#fi -#rm -Rvf $MTMOD_UNZ_NAME -#wget https://github.com/MarkuBu/ambianceplus/archive/master.zip -##git clone https://github.com/MarkuBu/ambianceplus.git -#mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" -#unzip "$MTMOD_SRC_ZIP" -#sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" -#if [ ! -d "$MTMOD_DEST_PATH" ]; then -# echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt -# cat $err_txt -# exit 1 -#fi - -#tenplus1's ambience/ambiance ambient sounds (fork linked at original's thread at https://forum.minetest.net/viewtopic.php?f=11&t=2807&start=275 ) -cd "$HOME/Downloads" -MTMOD_DL_ZIP=master.zip -MTMOD_SRC_ZIP=ambience.zip -MTMOD_UNZ_NAME=ambience-master -MTMOD_DEST_NAME=ambience -MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP -fi -if [ -f $MTMOD_SRC_ZIP ]; then - rm -f $MTMOD_SRC_ZIP -fi -rm -Rvf $MTMOD_UNZ_NAME -wget https://github.com/tenplus1/ambience/archive/master.zip -#git clone https://github.com/tenplus1/ambience.git -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" -unzip "$MTMOD_SRC_ZIP" -sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" -if [ ! -d "$MTMOD_DEST_PATH" ]; then - echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt - cat $err_txt - exit 1 -fi - - -#expertmm fork of minetest-mod-metatools -cd "$HOME/Downloads" -MTMOD_DL_ZIP=master.zip -MTMOD_SRC_ZIP=metatools.zip -MTMOD_UNZ_NAME=minetest-mod-metatools-master -MTMOD_DEST_NAME=metatools -MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP -fi -if [ -f $MTMOD_SRC_ZIP ]; then - rm -f $MTMOD_SRC_ZIP -fi -rm -Rvf $MTMOD_UNZ_NAME -wget https://github.com/expertmm/minetest-mod-metatools/archive/master.zip -#git clone https://github.com/expertmm/minetest-mod-metatools.git -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" -unzip "$MTMOD_SRC_ZIP" -sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" -if [ ! -d "$MTMOD_DEST_PATH" ]; then - echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt - cat $err_txt - exit 1 -fi - +#add_regular_mod ambianceplus-master ambianceplus https://github.com/MarkuBu/ambianceplus/archive/master.zip +# tenplus1's ambience/ambiance ambient sounds (fork linked at original's thread at https://forum.minetest.net/viewtopic.php?f=11&t=2807&start=275 ) +add_regular_mod ambience-master ambience https://github.com/tenplus1/ambience/archive/master.zip +# expertmm fork of LeMagnesium's minetest-mod-metatools +add_regular_mod minetest-mod-metatools-master metatools https://github.com/expertmm/minetest-mod-metatools/archive/master.zip #[mod-pack] sky critters (for mobs_redo) [mobs_sky] #requires mobs redo -cd $HOME/Downloads -MTMOD_DL_ZIP=master.zip -MTMOD_SRC_ZIP=mobs_sky.zip -MTMOD_UNZ_NAME=mobs_sky-master -MTMOD_DEST_NAME=mobs_sky -MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP -fi -if [ -f $MTMOD_SRC_ZIP ]; then - rm -f $MTMOD_SRC_ZIP -fi -wget https://github.com/blert2112/mobs_sky/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" -unzip "$MTMOD_SRC_ZIP" -sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" -if [ ! -d "$MTMOD_DEST_PATH" ]; then - echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt - cat $err_txt - exit 1 -fi - -#requires xpanes (now part of minetest_game), fake_fire (or not, since only uses fire:flint_and_steel, and fire is in minetest_game), and mobs redo or creatures -#REPLACES pyramids -cd $HOME/Downloads -MTMOD_DL_ZIP=master.zip -MTMOD_SRC_ZIP=spawners.zip -MTMOD_UNZ_NAME=minetest_gamers-spawners-* -MTMOD_DEST_NAME=spawners -MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP -fi -if [ -f $MTMOD_SRC_ZIP ]; then - rm -f $MTMOD_SRC_ZIP -fi -wget https://bitbucket.org/minetest_gamers/spawners/get/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" -unzip "$MTMOD_SRC_ZIP" -#mv minetest_gamers-spawners-* minetest_gamers-spawners -sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" -if [ ! -d "$MTMOD_DEST_PATH" ]; then - echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt - cat $err_txt - exit 1 -fi +add_regular_mod mobs_sky-master mobs_sky https://github.com/blert2112/mobs_sky/archive/master.zip +# forum_url: https://forum.minetest.net/viewtopic.php?f=11&t=13857 +# description: +# * REPLACES pyramids. +# * Works with mobs_redo and creatures. +# * optionally makes use of fire (in minetest_game; only uses fire:flint_and_steel), mobs, creatures, bones, xpanes (now part of minetest_game) +# * only RECIPES require fake_fire and xpanes +# * NOW (2017-2018) IS A MODPACK: formerly was a mod named spawners, now is a modpack containing: +# * spawners_env: appears in Dungeons and Temples (the pink stone ones); spawns hostile mobs; has small chance of spawning a spawner +# * spawners_mobs: spawns non-hostile mobs +# * spawners_ores: spawns ores +add_regular_mod minetest_gamers-spawners-* spawners https://bitbucket.org/minetest_gamers/spawners/get/master.zip echo "SPAWN_PYRAMIDS = true" > settings.txt echo "SPAWNERS_GENERATE = true" >> settings.txt echo "CHESTS_GENERATE = true" >> settings.txt sudo mv settings.txt "$MTMOD_DEST_PATH/" echo "NOTE: in spawners, only SPAWNERS_GENERATE or CHESTS_GENERATE, not both (SPAWNERS_GENERATE overrides) spawn in world for now. See thread for updated info: https://forum.minetest.net/viewtopic.php?f=11&t=13857&start=25" echo "see also expertmm's game-install-enliven-testing-SPAWNERS_BOTH_DEBUG.txt" - - +add_regular_mod playeranim-master playeranim https://github.com/minetest-mods/playeranim/archive/master.zip +# forum_url: https://forum.minetest.net/viewtopic.php?t=12189 +# description: Adds animations to the players' head +add_regular_mod playeranim-master playeranim https://github.com/minetest-mods/playeranim/archive/master.zip +add_regular_mod homedecor_modpack-master homedecor_modpack https://github.com/minetest-mods/homedecor_modpack/archive/master.zip +# expertmm fork of a rather non-maintained mod--forum link is at https://forum.minetest.net/viewtopic.php?id=3663 +# (original mod was at https://github.com/Doc22/birthstones-mod/archive/master.zip) +add_regular_mod minetest-birthstones-master birthstones https://github.com/expertmm/minetest-birthstones/archive/master.zip +add_regular_mod bakedclay-master bakedclay https://github.com/tenplus1/bakedclay/archive/master.zip +# https://forum.minetest.net/viewtopic.php?f=11&t=12440&p=310915#p310915 +# wget https://forum.minetest.net/download/file.php?id=6140 +# forum link file.php?id=6140 changed, so use salahzar's GitHub upload instead: +add_regular_mod minetest-invhack-master invhack https://github.com/salahzar/minetest-invhack/archive/master.zip +add_regular_mod unifieddyes-master unifieddyes https://github.com/minetest-mods/unifieddyes/archive/master.zip +#Sokomine's original version has no security ( https://forum.minetest.net/viewtopic.php?id=4877 ) +# https://github.com/Sokomine/travelnet/archive/master.zip +add_regular_mod travelnet-master travelnet https://github.com/expertmm/travelnet/archive/master.zip +add_regular_mod anvil-master anvil https://github.com/minetest-mods/anvil/archive/master.zip +add_regular_mod sling-master sling https://github.com/minetest-mods/sling/archive/master.zip #REPLACES PilzAdam's, modified by kaeza, maintained by VenessaE; FORMERLY in homedecor_modpack #forum post: https://forum.minetest.net/viewtopic.php?t=13762 -cd $HOME/Downloads -MTMOD_DL_ZIP=master.zip -MTMOD_SRC_ZIP=signs_lib.zip -MTMOD_UNZ_NAME=signs_lib-master -MTMOD_DEST_NAME=signs_lib -MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP -fi -if [ -f $MTMOD_SRC_ZIP ]; then - rm -f $MTMOD_SRC_ZIP -fi -if [ -d "$MTMOD_DEST_PATH" ]; then - sudo rm -Rf "$MTMOD_DEST_PATH" -fi -wget https://github.com/minetest-mods/signs_lib/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" -unzip "$MTMOD_SRC_ZIP" -sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" -if [ ! -d "$MTMOD_DEST_PATH" ]; then - echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt - cat $err_txt - exit 1 -fi - - - +# kaeza's signs_lib (forked from PilzAdam's and TheXYZ's code) was moved here from: https://github.com/kaeza/minetest-signs_lib-extrafonts/archive/master.zip +add_regular_mod signs_lib-master signs_lib https://github.com/minetest-mods/signs_lib/archive/master.zip +# EXTRA FONTS PACK for signs_lib DOESN'T SEEM TO WORK IN MULTIPLAYER, and is unwieldy to use: #cd $HOME/Downloads #MTMOD_DL_ZIP=master.zip #MTMOD_SRC_ZIP=minetest-signs_lib-extrafonts.zip #MTMOD_UNZ_NAME=minetest-signs_lib-extrafonts-master #MTMOD_DEST_NAME=signs_lib/textures #MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -##if [ -d "$MTMOD_UNZ_NAME" ]; then -#rm -Rf $MTMOD_UNZ_NAME -##fi +#if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable +# rm -Rf $MTMOD_UNZ_NAME +#fi #if [ -f $MTMOD_DL_ZIP ]; then # rm -f $MTMOD_DL_ZIP #fi @@ -1614,115 +1573,64 @@ fi #if [ ! -d "$MTMOD_DEST_PATH" ]; then # echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt # cat $err_txt +# sleep 3 # exit 1 #fi - -cd $HOME/Downloads -MTMOD_DL_ZIP=master.zip -MTMOD_SRC_ZIP=playeranim.zip -MTMOD_UNZ_NAME=playeranim-master -MTMOD_DEST_NAME=playeranim -MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP -fi -if [ -f $MTMOD_SRC_ZIP ]; then - rm -f $MTMOD_SRC_ZIP -fi -wget https://github.com/minetest-mods/playeranim/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" -unzip "$MTMOD_SRC_ZIP" -sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" -if [ ! -d "$MTMOD_DEST_PATH" ]; then - echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt - cat $err_txt - exit 1 -fi - -cd $HOME/Downloads -MTMOD_DL_ZIP=master.zip -MTMOD_SRC_ZIP=homedecor_modpack.zip -MTMOD_UNZ_NAME=homedecor_modpack-master -MTMOD_DEST_NAME=homedecor_modpack -MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP -fi -if [ -f $MTMOD_SRC_ZIP ]; then - rm -f $MTMOD_SRC_ZIP -fi -wget https://github.com/minetest-mods/homedecor_modpack/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" -unzip "$MTMOD_SRC_ZIP" -sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" -if [ ! -d "$MTMOD_DEST_PATH" ]; then - echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt - cat $err_txt - exit 1 -fi - - -#a rather non-maintained mod--forum link is at https://forum.minetest.net/viewtopic.php?id=3663 -cd $HOME/Downloads -MTMOD_DL_ZIP=master.zip -MTMOD_SRC_ZIP=birthstones.zip -#MTMOD_UNZ_NAME=birthstones-mod-master -MTMOD_UNZ_NAME=minetest-birthstones-master -MTMOD_DEST_NAME=birthstones +# NOTE: a skin database is at http://minetest.fensta.bplaced.net/ +# bell07's 2016 (FORK of Krock's fork of dmonty's) u_skins (u_skins is a skin GUI that works with unified_inventory, whereas other skin GUIs often use inventory++) +# Krock's is outdated and has remaining bugs such as in updater: wget https://github.com/SmallJoker/minetest-u_skinsdb/archive/master.zip +# bell07's no longer exists +# wget https://github.com/bell07/minetest-u_skinsdb/archive/master.zip +add_regular_mod minetest-u_skinsdb-master u_skinsdb https://github.com/dmonty2/minetest-u_skinsdb/archive/master.zip +# Update skins database (WARNING: skin numbering affects chosen player skin): +# (jq is a json processor, required for the updater bash script:) +# sudo apt-get -y install jq +# cd "$MTMOD_DEST_PATH" +# cd u_skins #bell07's version is a mod, not a modpack +# cd updater +# NOTE: +# Only download entire skins database if you +# REALLY, REALLY MEAN IT: +# ./update_skins_db.sh +# (note, bell07 has the fixed bash script, but the python3 script is still bugged as of 2016-01-29, and includes a .NET assembly that seems to only work for Windows (has meta directory not found error on mono for Linux) +# REMOVE EXISTING SKINS AND ONLY ADD expertmm skins: +cd "$HOME/Downloads" +MTMOD_SRC_ZIP=u_skins.zip +MTMOD_UNZ_NAME=minetest-u_skinsdb-master +MTMOD_DEST_NAME=u_skins MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP -fi if [ -f $MTMOD_SRC_ZIP ]; then rm -f $MTMOD_SRC_ZIP fi -#wget https://github.com/Doc22/birthstones-mod/archive/master.zip -wget https://github.com/expertmm/birthstones-mod/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +wget -O $MTMOD_SRC_ZIP https://github.com/expertmm/minetest-u_skinsdb/archive/master.zip +rm -Rvf $MTMOD_UNZ_NAME unzip "$MTMOD_SRC_ZIP" -sudo rm -Rf "$MTMOD_DEST_PATH" -sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" -if [ ! -d "$MTMOD_DEST_PATH" ]; then - echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt +SUB_NAME="u_skins/textures" # include u_skins since u_skins/u_skins IS THE MOD in the modpack +SUB_PATH="$MTMOD_DEST_PATH/$SUB_NAME" +if [ -d "$SUB_PATH" ]; then + echo "removing original $SUB_PATH..." + rm -Rf "$SUB_PATH" +fi +sudo mv -f $MTMOD_UNZ_NAME/$SUB_NAME "$SUB_PATH" +if [ ! -d "$SUB_PATH" ]; then + echo "ERROR: failed to install expertmm's skins to $SUB_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi - - - -cd $HOME/Downloads -MTMOD_DL_ZIP=master.zip -MTMOD_SRC_ZIP=bakedclay.zip -MTMOD_UNZ_NAME=bakedclay-master -MTMOD_DEST_NAME=bakedclay -MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP -fi -if [ -f $MTMOD_SRC_ZIP ]; then - rm -f $MTMOD_SRC_ZIP +SUB_NAME="u_skins/meta" # include u_skins since u_skins/u_skins IS THE MOD in the modpack +SUB_PATH="$MTMOD_DEST_PATH/$SUB_NAME" +if [ -d "$SUB_PATH" ]; then + echo "removing original $SUB_PATH..." + rm -Rf "$SUB_PATH" fi -wget https://github.com/tenplus1/bakedclay/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" -unzip "$MTMOD_SRC_ZIP" -sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" -if [ ! -d "$MTMOD_DEST_PATH" ]; then - echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt +sudo mv -f $MTMOD_UNZ_NAME/$SUB_NAME "$SUB_PATH" +if [ ! -d "$SUB_PATH" ]; then + echo "ERROR: failed to install expertmm's skins to $SUB_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi @@ -1732,9 +1640,9 @@ MTMOD_SRC_ZIP=farming.zip MTMOD_UNZ_NAME=farming-master MTMOD_DEST_NAME=farming MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME +fi if [ -f $MTMOD_DL_ZIP ]; then rm -f $MTMOD_DL_ZIP fi @@ -1752,10 +1660,10 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi - #Forum post: https://forum.minetest.net/viewtopic.php?f=11&t=10423 #Wuzzy's slimenodes mod (only available via give). cd "$HOME/Downloads" @@ -1765,9 +1673,9 @@ cd "$HOME/Downloads" MTMOD_UNZ_NAME=minetest_slimenodes MTMOD_DEST_NAME=slimenodes MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME +fi if [ -f $MTMOD_DL_ZIP ]; then rm -f $MTMOD_DL_ZIP fi @@ -1783,112 +1691,20 @@ sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi - -# https://forum.minetest.net/viewtopic.php?f=11&t=12440&p=310915#p310915 -cd $HOME/Downloads -#MTMOD_DL_ZIP=file.php?id=6140 -MTMOD_DL_ZIP=master.zip -MTMOD_SRC_ZIP=invhack.zip -MTMOD_UNZ_NAME=minetest-invhack-master -MTMOD_DEST_NAME=invhack -MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP -fi -if [ -f $MTMOD_SRC_ZIP ]; then - rm -f $MTMOD_SRC_ZIP -fi -if [ -d "$MTMOD_DEST_PATH" ]; then - sudo rm -Rf "$MTMOD_DEST_PATH" -fi -# wget https://forum.minetest.net/download/file.php?id=6140 -# forum link changed, so use salahzar's GitHub upload instead: -wget https://github.com/salahzar/minetest-invhack/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" -unzip "$MTMOD_SRC_ZIP" -sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" -if [ ! -d "$MTMOD_DEST_PATH" ]; then - echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt - cat $err_txt - exit 1 -fi - - - -cd $HOME/Downloads -MTMOD_DL_ZIP=master.zip -MTMOD_SRC_ZIP=unifieddyes.zip -MTMOD_UNZ_NAME=unifieddyes-master -MTMOD_DEST_NAME=unifieddyes -MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP -fi -if [ -f $MTMOD_SRC_ZIP ]; then - rm -f $MTMOD_SRC_ZIP -fi -if [ -d "$MTMOD_DEST_PATH" ]; then - sudo rm -Rf "$MTMOD_DEST_PATH" -fi -wget https://github.com/minetest-mods/unifieddyes/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" -unzip "$MTMOD_SRC_ZIP" -sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" -if [ ! -d "$MTMOD_DEST_PATH" ]; then - echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt - cat $err_txt - exit 1 -fi - - #(a trmp is just a modpack of TRMs for treasurer. At least one trm must be installed for treasurer to to anything) cd $HOME/Downloads -MTMOD_DL_ZIP=file.php?id=1301 +#MTMOD_DL_ZIP=file.php?id=1301 MTMOD_SRC_ZIP=trmp_minetest_game.zip MTMOD_UNZ_NAME=trmp_minetest_game MTMOD_DEST_NAME=trmp_minetest_game MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME fi -if [ -f $MTMOD_SRC_ZIP ]; then - rm -f $MTMOD_SRC_ZIP -fi -if [ -d "$MTMOD_DEST_PATH" ]; then - sudo rm -Rf "$MTMOD_DEST_PATH" -fi -wget https://forum.minetest.net/download/file.php?id=1301 -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" -unzip "$MTMOD_SRC_ZIP" -sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" -if [ ! -d "$MTMOD_DEST_PATH" ]; then - echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt - cat $err_txt - exit 1 -fi - -#Sokomine's original version has no security ( https://forum.minetest.net/viewtopic.php?id=4877 ) -cd $HOME/Downloads -MTMOD_DL_ZIP=master.zip -MTMOD_SRC_ZIP=travelnet.zip -MTMOD_UNZ_NAME=travelnet-master -MTMOD_DEST_NAME=travelnet -MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi if [ -f $MTMOD_DL_ZIP ]; then rm -f $MTMOD_DL_ZIP fi @@ -1898,17 +1714,17 @@ fi if [ -d "$MTMOD_DEST_PATH" ]; then sudo rm -Rf "$MTMOD_DEST_PATH" fi -#wget https://github.com/Sokomine/travelnet/archive/master.zip -wget https://github.com/expertmm/travelnet/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +wget -O $MTMOD_SRC_ZIP https://forum.minetest.net/download/file.php?id=1301 +#mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" unzip "$MTMOD_SRC_ZIP" sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" -sudo rm -Rf "$MTMOD_DEST_PATH/etc" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt cat $err_txt + sleep 3 exit 1 fi + echo echo echo @@ -1943,7 +1759,7 @@ if [ -d "$PATCHES_PATH" ]; then TARGET_PATH=$MT_MYGAME_MODS_PATH/homedecor_modpack/homedecor/gastronomy.lua MTMOD_DEST_NAME=homedecor_modpack MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/homedecor_modpack/homedecor - TRY_DIFF="`diff $BASIS_PATH $TARGET_PATH`" + TRY_DIFF="`diff $BASIS_PATH $TARGET_PATH`" if [ -z "$TRY_DIFF" ]; then sudo cp -f $MODIFIED_PATH "$MTMOD_DEST_PATH/" else @@ -1953,7 +1769,7 @@ if [ -d "$PATCHES_PATH" ]; then MODIFIED_PATH=$PATCHES_PATH/subgame/mods/homedecor_modpack/homedecor/crafts.lua TARGET_PATH=$MT_MYGAME_MODS_PATH/homedecor_modpack/homedecor/crafts.lua MTMOD_DEST_NAME=homedecor_modpack - TRY_DIFF="`diff $BASIS_PATH $TARGET_PATH`" + TRY_DIFF="`diff $BASIS_PATH $TARGET_PATH`" if [ -z "$TRY_DIFF" ]; then sudo cp -f $MODIFIED_PATH "$MTMOD_DEST_PATH/" else @@ -1974,7 +1790,6 @@ echo "sudo rm -Rf /usr/share/games/minetest/games/ENLIVEN/mods/worldedit/worlded echo "# not recommended:" echo "sudo cp -R $PATCHES_PATH/mods-stopgap/* $MT_MYGAME_MODS_PATH/" echo "sudo rm -Rf $MT_MYGAME_MODS_PATH/1.nonworking" - echo echo echo diff --git a/etc/game-install-enliven-testing.sh b/etc/game-install-enliven-testing.sh index c9f3e13..5f5db8d 100644 --- a/etc/game-install-enliven-testing.sh +++ b/etc/game-install-enliven-testing.sh @@ -14,7 +14,7 @@ echo "* torches: removes ceiling torches" # * merge /home and unifiedinventory home (and make both require home priv) #TODO for enliven main branch: -# * shift click to pull out maximum number of items you can create (such as multiple stacks of stairs from wood) +# * shift click to pull out maximum number of items you can create (such as multiple stacks of stairs from wood) # * kick players at certain time intervals (if play span when logged in is not current play span, then kick) such as for schools # * remove recipe for flint&steel (obsidian shard+Wrought Iron Ingot [default:steel_ingot]) # * detect whether tnt is disabled, and make obtaining it obtain a note or something (or somehow disable spawning of item in rail corridor chests where I found some) @@ -28,27 +28,26 @@ echo "* torches: removes ceiling torches" # * resolve mg_villages error: #2017-01-30 03:08:37: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'default' in callback item_OnPlace(): ...e/minetest/games/enliven/mods/mg_villages/protection.lua:215: attempt to concatenate field 'mts_path' (a nil value) #2017-01-30 03:08:37: ERROR[Main]: stack traceback: -#2017-01-30 03:08:37: ERROR[Main]: ...e/minetest/games/enliven/mods/mg_villages/protection.lua:215: in function 'on_rightclick' -#2017-01-30 03:08:37: ERROR[Main]: ...ocal/share/minetest/games/enliven/mods/default/torch.lua:67: in function <...ocal/share/minetest/games/enliven/mods/default/#torch.lua:61> -#2017-01-30 03:08:37: ACTION[Server]: singleplayer leaves game. List of players: +#2017-01-30 03:08:37: ERROR[Main]: ...e/minetest/games/enliven/mods/mg_villages/protection.lua:215: in function 'on_rightclick' +#2017-01-30 03:08:37: ERROR[Main]: ...ocal/share/minetest/games/enliven/mods/default/torch.lua:67: in function <...ocal/share/minetest/games/enliven/mods/default/#torch.lua:61> +#2017-01-30 03:08:37: ACTION[Server]: singleplayer leaves game. List of players: #2017-01-30 03:08:37: ACTION[Main]: [fishing] Server shuts down. saving trophies table # * resolve issue where signslib uses small Helvetica Narrow font even if extrafonts is used properly by 31px/* (largest) being copied to signslib/textures/ (see below) # * check whether special_picks large picks can break protection # * change uses of maxwear=x to uses=1/x as per minetest server startup warnings: plantlife_modpack/vines/shear.lua and worldedit_commands/wand.lua # * sometimes sorting compassgps by location crashes (only on the included user file named yelby in the etc folder) - +if [ ! -d "$MT_MYGAME_MODS_PATH" ]; then + echo "bad MT_MYGAME_MODS_PATH=$MT_MYGAME_MODS_PATH, so you must be doing it wrong." + exit 1 +fi #used by mg_villages fork by Sokomine cd $HOME/Downloads -MTMOD_DL_ZIP=master.zip MTMOD_SRC_ZIP=handle_schematics.zip MTMOD_UNZ_NAME=handle_schematics-master MTMOD_DEST_NAME=handle_schematics MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME fi if [ -f $MTMOD_SRC_ZIP ]; then rm -f $MTMOD_SRC_ZIP @@ -56,13 +55,12 @@ fi if [ -d "$MTMOD_DEST_PATH" ]; then sudo rm -Rf "$MTMOD_DEST_PATH" fi -wget https://github.com/Sokomine/handle_schematics/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +wget -O $MTMOD_SRC_ZIP https://github.com/Sokomine/handle_schematics/archive/master.zip unzip "$MTMOD_SRC_ZIP" sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." - exit 1 + exit 1 fi @@ -70,16 +68,12 @@ fi #This mod is part of minetest_game 0.4.15! #With exception of the wieldlight #cd $HOME/Downloads -#MTMOD_DL_ZIP=master.zip #MTMOD_SRC_ZIP=torches.zip #MTMOD_UNZ_NAME=torches-master #MTMOD_DEST_NAME=torches #MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -##if [ -d "$MTMOD_UNZ_NAME" ]; then -#rm -Rf $MTMOD_UNZ_NAME -##fi -#if [ -f $MTMOD_DL_ZIP ]; then -# rm -f $MTMOD_DL_ZIP +#if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable +# rm -Rf $MTMOD_UNZ_NAME #fi #if [ -f $MTMOD_SRC_ZIP ]; then # rm -f $MTMOD_SRC_ZIP @@ -87,27 +81,22 @@ fi #if [ -d "$MTMOD_DEST_PATH" ]; then # sudo rm -Rf "$MTMOD_DEST_PATH" #fi -#wget https://github.com/BlockMen/torches/archive/master.zip -#mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +#wget -O $MTMOD_SRC_ZIP https://github.com/BlockMen/torches/archive/master.zip #unzip "$MTMOD_SRC_ZIP" #sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" #if [ ! -d "$MTMOD_DEST_PATH" ]; then # echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." -# exit 1 +# exit 1 #fi cd $HOME/Downloads -MTMOD_DL_ZIP=master.zip MTMOD_SRC_ZIP=moresnow.zip MTMOD_UNZ_NAME=moresnow-master MTMOD_DEST_NAME=moresnow MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME fi if [ -f $MTMOD_SRC_ZIP ]; then rm -f $MTMOD_SRC_ZIP @@ -115,13 +104,12 @@ fi if [ -d "$MTMOD_DEST_PATH" ]; then sudo rm -Rf "$MTMOD_DEST_PATH" fi -wget https://github.com/Sokomine/moresnow/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +wget -O $MTMOD_SRC_ZIP https://github.com/Sokomine/moresnow/archive/master.zip unzip "$MTMOD_SRC_ZIP" sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." - exit 1 + exit 1 fi @@ -129,16 +117,12 @@ fi echo "Installing adrido's (NOT MasterGollum's which is incompatible with moreblocks) darkage..." #linked from MasterGollum's: https://forum.minetest.net/viewtopic.php?id=3213 cd $HOME/Downloads -MTMOD_DL_ZIP=master.zip MTMOD_SRC_ZIP=darkage.zip MTMOD_UNZ_NAME=darkage-master MTMOD_DEST_NAME=darkage MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME fi if [ -f $MTMOD_SRC_ZIP ]; then rm -f $MTMOD_SRC_ZIP @@ -146,26 +130,21 @@ fi if [ -d "$MTMOD_DEST_PATH" ]; then sudo rm -Rf "$MTMOD_DEST_PATH" fi -wget https://github.com/adrido/darkage/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +wget -O $MTMOD_SRC_ZIP https://github.com/adrido/darkage/archive/master.zip unzip "$MTMOD_SRC_ZIP" sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." - exit 1 + exit 1 fi cd $HOME/Downloads -MTMOD_DL_ZIP=master.zip MTMOD_SRC_ZIP=cottages.zip MTMOD_UNZ_NAME=cottages-master MTMOD_DEST_NAME=cottages MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME fi if [ -f $MTMOD_SRC_ZIP ]; then rm -f $MTMOD_SRC_ZIP @@ -173,56 +152,23 @@ fi if [ -d "$MTMOD_DEST_PATH" ]; then sudo rm -Rf "$MTMOD_DEST_PATH" fi -wget https://github.com/Sokomine/cottages/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +wget $MTMOD_SRC_ZIP https://github.com/Sokomine/cottages/archive/master.zip unzip "$MTMOD_SRC_ZIP" sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." - exit 1 + exit 1 fi -#forum post (Sokomine's mg_villages provides villages for all mapgens and is based on is fork of Nores mg mapgen): https://forum.minetest.net/viewtopic.php?f=9&t=13116 -cd $HOME/Downloads -MTMOD_DL_ZIP=master.zip -MTMOD_SRC_ZIP=mg_villages.zip -MTMOD_UNZ_NAME=mg_villages-master -MTMOD_DEST_NAME=mg_villages -MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP -fi -if [ -f $MTMOD_SRC_ZIP ]; then - rm -f $MTMOD_SRC_ZIP -fi -if [ -d "$MTMOD_DEST_PATH" ]; then - sudo rm -Rf "$MTMOD_DEST_PATH" -fi -wget https://github.com/Sokomine/mg_villages/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" -unzip "$MTMOD_SRC_ZIP" -sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" -if [ ! -d "$MTMOD_DEST_PATH" ]; then - echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." - exit 1 -fi - cd $HOME/Downloads -MTMOD_DL_ZIP=master.zip MTMOD_SRC_ZIP=advanced_npc.zip MTMOD_UNZ_NAME=advanced_npc-master MTMOD_DEST_NAME=advanced_npc MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME fi if [ -f $MTMOD_SRC_ZIP ]; then rm -f $MTMOD_SRC_ZIP @@ -230,28 +176,23 @@ fi if [ -d "$MTMOD_DEST_PATH" ]; then sudo rm -Rf "$MTMOD_DEST_PATH" fi -wget https://github.com/hkzorman/advanced_npc/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +wget -O $MTMOD_SRC_ZIP https://github.com/hkzorman/advanced_npc/archive/master.zip unzip "$MTMOD_SRC_ZIP" sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." - exit 1 + exit 1 fi #forum post (special_picks by cx384): https://forum.minetest.net/viewtopic.php?f=11&t=9574 cd $HOME/Downloads -MTMOD_DL_ZIP=master.zip MTMOD_SRC_ZIP=special_picks.zip MTMOD_UNZ_NAME=special_picks-master MTMOD_DEST_NAME=special_picks MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME -#fi -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME fi if [ -f $MTMOD_SRC_ZIP ]; then rm -f $MTMOD_SRC_ZIP @@ -259,35 +200,86 @@ fi if [ -d "$MTMOD_DEST_PATH" ]; then sudo rm -Rf "$MTMOD_DEST_PATH" fi -wget https://github.com/cx384/special_picks/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +wget -O $MTMOD_SRC_ZIP https://github.com/cx384/special_picks/archive/master.zip unzip "$MTMOD_SRC_ZIP" sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" if [ ! -d "$MTMOD_DEST_PATH" ]; then echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." - exit 1 + exit 1 fi -cd $HOME/Downloads -MTMOD_DL_ZIP=master.zip -MTMOD_SRC_ZIP=travelnet.zip -MTMOD_UNZ_NAME=travelnet-master -MTMOD_DEST_NAME=travelnet -MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME -#if [ -d "$MTMOD_UNZ_NAME" ]; then -rm -Rf $MTMOD_UNZ_NAME + +# no longer needed since ENLIVEN main branch now uses expertmm travelnet: +#cd $HOME/Downloads +#MTMOD_SRC_ZIP=travelnet.zip +#MTMOD_UNZ_NAME=travelnet-master +#MTMOD_DEST_NAME=travelnet +#MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable +# rm -Rf $MTMOD_UNZ_NAME +#fi +#if [ -f $MTMOD_SRC_ZIP ]; then +# rm -f $MTMOD_SRC_ZIP #fi -if [ -f $MTMOD_DL_ZIP ]; then - rm -f $MTMOD_DL_ZIP +#if [ -d "$MTMOD_DEST_PATH" ]; then +# sudo rm -Rf "$MTMOD_DEST_PATH" +#fi +#wget -O $MTMOD_SRC_ZIP https://github.com/Sokomine/travelnet/archive/master.zip +#unzip "$MTMOD_SRC_ZIP" +#sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" + + + + +cd "$HOME/Downloads" +#does NOT have a zip extension when downloaded via wget: +MTMOD_SRC_ZIP=mesecons_modpack.zip +MTMOD_UNZ_NAME=mesecons-master +MTMOD_DEST_NAME=mesecons +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable + rm -Rf $MTMOD_UNZ_NAME fi -if [ -f $MTMOD_SRC_ZIP ]; then - rm -f $MTMOD_SRC_ZIP +rm -Rf minetest-mods-mesecons-* +rm -Rf "" +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm -f "$MTMOD_SRC_ZIP" fi +wget -O $MTMOD_SRC_ZIP https://github.com/minetest-mods/mg/archive/master.zip +unzip $MTMOD_SRC_ZIP if [ -d "$MTMOD_DEST_PATH" ]; then sudo rm -Rf "$MTMOD_DEST_PATH" fi -wget https://github.com/Sokomine/travelnet/archive/master.zip -mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" -unzip "$MTMOD_SRC_ZIP" -sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to create $MTMOD_DEST_PATH, so cannot continue." > $err_txt + cat $err_txt + sleep 3 + exit 1 +fi + +# no longer needed (?) since minetest-mods now maintains an mg with villages +#forum post (Sokomine's mg_villages provides villages for all mapgens and is based on is fork of Nores mg mapgen): https://forum.minetest.net/viewtopic.php?f=9&t=13116 +#cd $HOME/Downloads +#MTMOD_SRC_ZIP=mg_villages.zip +#MTMOD_UNZ_NAME=mg_villages-master +#MTMOD_DEST_NAME=mg_villages +#MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ ! -z "`ls | grep $MTMOD_UNZ_NAME`" ]; then # works with wildcard in variable +# rm -Rf $MTMOD_UNZ_NAME +#fi +#if [ -f $MTMOD_SRC_ZIP ]; then +# rm -f $MTMOD_SRC_ZIP +#fi +#if [ -d "$MTMOD_DEST_PATH" ]; then +# sudo rm -Rf "$MTMOD_DEST_PATH" +#fi +#wget -O $MTMOD_SRC_ZIP https://github.com/Sokomine/mg_villages/archive/master.zip +#unzip "$MTMOD_SRC_ZIP" +#sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +#if [ ! -d "$MTMOD_DEST_PATH" ]; then +# echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." +# exit 1 +#fi + diff --git a/mtsenliven.py b/mtsenliven.py index d4b0200..e0ef1d5 100644 --- a/mtsenliven.py +++ b/mtsenliven.py @@ -1,6 +1,10 @@ #!/usr/bin/env python3 # runs minetestserver using the paths defined by minetestinfo +# NOTE: SIGINT (as opposed to KILL) makes sure minetest server +# shuts down properly (makes sure all processes finish) according to +# dr4Ke on +# https://forum.minetest.net/viewtopic.php?f=11&t=13138&start=50 import os from mtanalyze.minetestinfo import * @@ -60,29 +64,53 @@ for flag in msg_flags: # see https://www.endpoint.com/blog/2015/01/28/getting-realtime-output- # using-python +non_unique_wraps = [] +non_unique_wraps.append( + { + "opener":"active block modifiers took ", + "closer":"ms (longer than 200ms)" + } +) + +unique_flags = [ + "leaves game", + "joins game" +] + def print_unique_only(output, err_flag=False): output_strip = output.strip() + u_prefix = "active block modifiers took " + u_suffix = "ms (longer than 200ms)" # (out_bytes is bytes) show_enable = True found_flag = None f_i = None - for flag in msg_flags: - # such as '2018-02-06 21:08:06: WARNING[Server]: Deprecated call to get_look_yaw, use get_look_horizontal instead' - # or 2018-02-06 21:08:05: ACTION[Server]: [playereffects] Wrote playereffects data into /home/owner/.minetest/worlds/FCAGameAWorld/playereffects.mt. - f_i = output.find(flag) - if f_i >= 0: - found_flag = flag - break - if found_flag: - sub_msg = output[f_i+len(flag):].strip() - if sub_msg in msg_lists[found_flag]: - show_enable = False - else: - msg_lists[found_flag].append(sub_msg) + always_show_enable = False + for flag in unique_flags: + if flag in output: + always_show_enable = True + if not always_show_enable: + for flag in msg_flags: + # such as '2018-02-06 21:08:06: WARNING[Server]: Deprecated call to get_look_yaw, use get_look_horizontal instead' + # or 2018-02-06 21:08:05: ACTION[Server]: [playereffects] Wrote playereffects data into /home/owner/.minetest/worlds/FCAGameAWorld/playereffects.mt. + f_i = output.find(flag) + if f_i >= 0: + found_flag = flag + break + if found_flag: + sub_msg = output[f_i+len(flag):].strip() + for wrap in non_unique_wraps: + if wrap["opener"] in sub_msg and wrap["closer"] in sub_msg: + sub_msg = wrap["opener"] + "..." + wrap["closer"] + break + if sub_msg in msg_lists[found_flag]: + show_enable = False + else: + msg_lists[found_flag].append(sub_msg) if show_enable: print(output_strip) if found_flag is not None: - print(" [ mtsenliven.py ] previous msg will be repressed") + print(" [ mtsenliven.py ] previous msg will be suppressed") def process_msg(bstring): output = bstring @@ -104,28 +132,35 @@ def process_msg(bstring): # see jfs's answer on https://stackoverflow.com/questions/31833897/python-read-from-subprocess-stdout-and-stderr-separately-while-preserving-order def reader(pipe, q): try: - with pipe: - for line in iter(pipe.readline, b''): - q.put((pipe, line)) - finally: - q.put(None) + try: + with pipe: + for line in iter(pipe.readline, b''): + q.put((pipe, line)) + finally: + q.put(None) + except KeyboardInterrupt: + print("[ mtsenliven.py ] SIGINT should shut down server safely") + pass q = Queue() Thread(target=reader, args=[process.stdout, q]).start() Thread(target=reader, args=[process.stderr, q]).start() - -for _ in range(2): - for source, line in iter(q.get, None): - # print "%s: %s" % (source, line), - s = source - l = line - # NOTE: source is a string such as "<_io.BufferedReader name=5>" - try: - l = line.decode("utf-8") - except: - # this should never happen but doesn't matter anyway - pass - process_msg("%s: %s" % (s, l)) +try: + for _ in range(2): + for source, line in iter(q.get, None): + # print "%s: %s" % (source, line), + s = source + l = line + # NOTE: source is a string such as "<_io.BufferedReader name=5>" + try: + l = line.decode("utf-8") + except: + # this should never happen but doesn't matter anyway + pass + process_msg("%s: %s" % (s, l)) +except KeyboardInterrupt: + print("[ mtsenliven.py ] SIGINT should shut down server safely") + pass exit(0) @@ -145,5 +180,6 @@ while True: # process_msg(err_bytes) rc = process.poll() except KeyboardInterrupt: + print("[ mtsenliven.py ] SIGINT should shut down server safely") break # process.kill() diff --git a/patches/mods-deprecated/cme_to_spawners-0.4.15-git/README.txt b/patches/mods-deprecated/cme_to_spawners-0.4.15-git/README.txt new file mode 100644 index 0000000..72919db --- /dev/null +++ b/patches/mods-deprecated/cme_to_spawners-0.4.15-git/README.txt @@ -0,0 +1,11 @@ +Minetest Game mod: cme_to_spawners +========================= +This mod provides a transition from cme (Creatures Mob Engine) so you can use "spawners" mod instead, which uses mobs_monsters [mobs redo monsters] and a new spawners:mummy. + +Authors of source code +---------------------- +expertmm (github.com/expertmm) + +Authors of media (textures) +--------------------------- +(no media) \ No newline at end of file diff --git a/patches/mods-deprecated/cme_to_spawners-0.4.15-git/depends.txt b/patches/mods-deprecated/cme_to_spawners-0.4.15-git/depends.txt new file mode 100644 index 0000000..00da52c --- /dev/null +++ b/patches/mods-deprecated/cme_to_spawners-0.4.15-git/depends.txt @@ -0,0 +1,6 @@ +default +farming +mobs +mobs_monster +mobs_animal +spawners diff --git a/patches/mods-deprecated/cme_to_spawners-0.4.15-git/init.lua b/patches/mods-deprecated/cme_to_spawners-0.4.15-git/init.lua new file mode 100644 index 0000000..8c80110 --- /dev/null +++ b/patches/mods-deprecated/cme_to_spawners-0.4.15-git/init.lua @@ -0,0 +1,59 @@ +-- Copyright 2017 expertmm +-- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +-- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-- NOTE: register_alias is not needed for mobs, since alias_mob calls that +-- minetest.register_alias(name, convert_to) +-- "This means that if the engine finds nodes with the name name in the world the node with the name convert_to is used instead. " +-- +-- minetest.register_alias("creatures:chicken", "mobs_animal:chicken") +-- minetest.register_alias("creatures:sheep", "mobs_animal:sheep_white") +-- minetest.register_alias("mobs_animal:sheep", "mobs_animal:sheep_white") -- this is to fix an earlier bug in this mod +-- minetest.register_alias("creatures:ghost", "mobs_monster:spider") +-- minetest.register_alias("creatures:mummy", "spawners:mummy") +-- minetest.register_alias("creatures:mummy", "mobs_monster:stone_monster") +-- minetest.register_alias("creatures:oerrki", "mobs_monster:oerrki") +-- minetest.register_alias("creatures:zombie", "mobs_monster:stone_monster") + +mobs:alias_mob("creatures:chicken", "mobs_animal:chicken") +mobs:alias_mob("creatures:sheep", "mobs_animal:sheep_white") +mobs:alias_mob("mobs_animal:sheep", "mobs_animal:sheep_white") -- this is to fix an earlier bug in this mod +mobs:alias_mob("creatures:ghost", "mobs_monster:spider") +mobs:alias_mob("creatures:mummy", "spawners:mummy") +-- minetest.register_alias("creatures:mummy", "mobs_monster:stone_monster") +mobs:alias_mob("creatures:oerrki", "mobs_monster:oerrki") +mobs:alias_mob("creatures:zombie", "mobs_monster:stone_monster") + +minetest.register_alias("creatures:chicken_spawner", "spawners:mobs_chicken_spawner") +minetest.register_alias("creatures:ghost_spawner", "spawners:mobs_spider_spawner") +minetest.register_alias("creatures:mummy_spawner", "spawners:spawners_mummy_spawner") +minetest.register_alias("creatures:oerrki_spawner", "spawners:mobs_oerkki_spawner") +minetest.register_alias("creatures:sheep_spawner", "spawners:mobs_sheep_white_spawner") +minetest.register_alias("creatures:zombie_spawner", "spawners:mobs_stone_monster_spawner") + +-- meat: +minetest.register_alias("creatures:chicken_flesh", "mobs:chicken_raw") +minetest.register_alias("creatures:chicken_meat", "mobs:chicken_cooked") +minetest.register_alias("creatures:rotten_flesh", "") +minetest.register_alias("creatures:grilled_rotten_flesh", "") +minetest.register_alias("creatures:flesh", "mobs:meat_raw") +minetest.register_alias("creatures:meat", "mobs:meat") + +-- non-meat food: +minetest.register_alias("creatures:egg", "mobs:egg") +minetest.register_alias("creatures:fried_egg", "mobs:chicken_egg_fried") + +-- materials: +minetest.register_alias("creatures:feather", "farming:string") + +-- tools: +minetest.register_alias("creatures:shears", "mobs:shears") + +-- eggs (there is no true chicken spawner egg item (at least in egg texture) in spawners or mobs, so using regular chicken which works the same (could also use mobs:egg for partial effectiveness) instead): +minetest.register_alias("creatures:chicken_spawn_egg", "mobs_animal:chicken") +minetest.register_alias("creatures:ghost_spawn_egg", "mobs_monster:spider") +minetest.register_alias("creatures:mummy_spawn_egg", "spawners:mummy") +minetest.register_alias("creatures:oerrki_spawn_egg", "mobs_monster:oerkki") +minetest.register_alias("creatures:sheep_spawn_egg", "mobs:sheep_white") +minetest.register_alias("creatures:zombie_spawn_egg", "mobs_monster:stone_monster") diff --git a/patches/mods-stopgap/cme_to_spawners/depends.txt b/patches/mods-stopgap/cme_to_spawners/depends.txt index 00da52c..0f31658 100644 --- a/patches/mods-stopgap/cme_to_spawners/depends.txt +++ b/patches/mods-stopgap/cme_to_spawners/depends.txt @@ -3,4 +3,4 @@ farming mobs mobs_monster mobs_animal -spawners +spawners_mobs diff --git a/patches/mods-stopgap/cme_to_spawners/init.lua b/patches/mods-stopgap/cme_to_spawners/init.lua index 8c80110..b69d6a3 100644 --- a/patches/mods-stopgap/cme_to_spawners/init.lua +++ b/patches/mods-stopgap/cme_to_spawners/init.lua @@ -11,7 +11,7 @@ -- minetest.register_alias("creatures:sheep", "mobs_animal:sheep_white") -- minetest.register_alias("mobs_animal:sheep", "mobs_animal:sheep_white") -- this is to fix an earlier bug in this mod -- minetest.register_alias("creatures:ghost", "mobs_monster:spider") --- minetest.register_alias("creatures:mummy", "spawners:mummy") +-- minetest.register_alias("creatures:mummy", "spawners_mobs:mummy") -- minetest.register_alias("creatures:mummy", "mobs_monster:stone_monster") -- minetest.register_alias("creatures:oerrki", "mobs_monster:oerrki") -- minetest.register_alias("creatures:zombie", "mobs_monster:stone_monster") @@ -20,17 +20,17 @@ mobs:alias_mob("creatures:chicken", "mobs_animal:chicken") mobs:alias_mob("creatures:sheep", "mobs_animal:sheep_white") mobs:alias_mob("mobs_animal:sheep", "mobs_animal:sheep_white") -- this is to fix an earlier bug in this mod mobs:alias_mob("creatures:ghost", "mobs_monster:spider") -mobs:alias_mob("creatures:mummy", "spawners:mummy") +mobs:alias_mob("creatures:mummy", "spawners_mobs:mummy") -- minetest.register_alias("creatures:mummy", "mobs_monster:stone_monster") mobs:alias_mob("creatures:oerrki", "mobs_monster:oerrki") mobs:alias_mob("creatures:zombie", "mobs_monster:stone_monster") -minetest.register_alias("creatures:chicken_spawner", "spawners:mobs_chicken_spawner") -minetest.register_alias("creatures:ghost_spawner", "spawners:mobs_spider_spawner") -minetest.register_alias("creatures:mummy_spawner", "spawners:spawners_mummy_spawner") -minetest.register_alias("creatures:oerrki_spawner", "spawners:mobs_oerkki_spawner") -minetest.register_alias("creatures:sheep_spawner", "spawners:mobs_sheep_white_spawner") -minetest.register_alias("creatures:zombie_spawner", "spawners:mobs_stone_monster_spawner") +minetest.register_alias("creatures:chicken_spawner", "spawners_mobs:mobs_chicken_spawner") +minetest.register_alias("creatures:ghost_spawner", "spawners_env:mobs_spider_spawner") +minetest.register_alias("creatures:mummy_spawner", "spawners_mobs:spawners_mobs_mummy_spawner") +minetest.register_alias("creatures:oerrki_spawner", "spawners_mobs:mobs_oerkki_spawner") +minetest.register_alias("creatures:sheep_spawner", "spawners_mobs:mobs_sheep_white_spawner") +minetest.register_alias("creatures:zombie_spawner", "spawners_mobs:mobs_stone_monster_spawner") -- meat: minetest.register_alias("creatures:chicken_flesh", "mobs:chicken_raw") @@ -53,7 +53,7 @@ minetest.register_alias("creatures:shears", "mobs:shears") -- eggs (there is no true chicken spawner egg item (at least in egg texture) in spawners or mobs, so using regular chicken which works the same (could also use mobs:egg for partial effectiveness) instead): minetest.register_alias("creatures:chicken_spawn_egg", "mobs_animal:chicken") minetest.register_alias("creatures:ghost_spawn_egg", "mobs_monster:spider") -minetest.register_alias("creatures:mummy_spawn_egg", "spawners:mummy") +minetest.register_alias("creatures:mummy_spawn_egg", "spawners_mobs:mummy") minetest.register_alias("creatures:oerrki_spawn_egg", "mobs_monster:oerkki") minetest.register_alias("creatures:sheep_spawn_egg", "mobs:sheep_white") minetest.register_alias("creatures:zombie_spawn_egg", "mobs_monster:stone_monster") diff --git a/patches/mods-stopgap/spawners_to_spawners_mobs/README.txt b/patches/mods-stopgap/spawners_to_spawners_mobs/README.txt new file mode 100644 index 0000000..53ac814 --- /dev/null +++ b/patches/mods-stopgap/spawners_to_spawners_mobs/README.txt @@ -0,0 +1,11 @@ +Minetest Game mod: spawners_to_spawners_mobs +========================= +This mod provides a transition from spawners (old non-modpack version) in case of existing worlds, so you can use the new modpack version of spawners instead, which still uses mobs_monsters [mobs redo monsters] but also uses spawners_mobs:mummy (formerly spawners:mummy). + +Authors of source code +---------------------- +expertmm (github.com/expertmm) + +Authors of media (textures) +--------------------------- +(no media) diff --git a/patches/mods-stopgap/spawners_to_spawners_mobs/depends.txt b/patches/mods-stopgap/spawners_to_spawners_mobs/depends.txt new file mode 100644 index 0000000..0f31658 --- /dev/null +++ b/patches/mods-stopgap/spawners_to_spawners_mobs/depends.txt @@ -0,0 +1,6 @@ +default +farming +mobs +mobs_monster +mobs_animal +spawners_mobs diff --git a/patches/mods-stopgap/spawners_to_spawners_mobs/init.lua b/patches/mods-stopgap/spawners_to_spawners_mobs/init.lua new file mode 100644 index 0000000..96e8504 --- /dev/null +++ b/patches/mods-stopgap/spawners_to_spawners_mobs/init.lua @@ -0,0 +1,13 @@ +-- Copyright 2017 expertmm +-- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +-- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-- NOTE: register_alias is not needed for mobs, since alias_mob calls that +-- minetest.register_alias(name, convert_to) +-- "This means that if the engine finds nodes with the name name in the world the node with the name convert_to is used instead. " +-- + +mobs:alias_mob("spawners:mummy", "spawners_mobs:mummy") +mobs:alias_mob("spawners:bunny_evil", "spawners_mobs:bunny_evil") +mobs:alias_mob("spawners:uruk_hai", "spawners_mobs:uruk_hai")