From 074a69afe36d41c29f88906b462042669298ea10 Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Wed, 21 Aug 2019 18:12:28 -0400 Subject: [PATCH] Improve prepatch usage help. Fix old installer. --- prepatch.sh | 5 ++++- .../install-ENLIVEN-minetest_game.sh | 18 ++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/prepatch.sh b/prepatch.sh index b93c890..564f8f1 100755 --- a/prepatch.sh +++ b/prepatch.sh @@ -1,5 +1,4 @@ #!/bin/bash -# such as meld /home/owner/minetest/games/ENLIVEN/ /home/owner/git/EnlivenMinetest/patches/Bucket_Game-patched/ me=`basename "$0"` customDie() { @@ -139,6 +138,10 @@ if [ ! -d "$patches" ]; then fi licenses="license.txt LICENSE LICENSE.txt oldcoder.txt LICENSE.md license.md" usage() { + echo + echo + echo "Usage:" + echo echo "$me " echo "* will be copied to $project1 and $project2" echo diff --git a/utilities/deprecated/install-ENLIVEN-minetest_game.sh b/utilities/deprecated/install-ENLIVEN-minetest_game.sh index de07bf1..c39858a 100755 --- a/utilities/deprecated/install-ENLIVEN-minetest_game.sh +++ b/utilities/deprecated/install-ENLIVEN-minetest_game.sh @@ -97,7 +97,8 @@ if [ ! -f "`command -v minetestmapper`" ]; then fi fi fi - pushd ~/Downloads + prevPath="`pwd`" + cd ~/Downloads if [ -d minetestmapper ]; then rm -Rf minetestmapper fi @@ -111,7 +112,7 @@ if [ ! -f "`command -v minetestmapper`" ]; then else echo "FAILED to compile minetestmapper--python version will be used" fi - popd + cd "$prevPath" fi if [ -d /tmp/local_mts_user ]; then @@ -127,6 +128,11 @@ echo $USER > /tmp/local_mts_user # sudo chown `cat /tmp/local_mts_user` "$MT_MYWORLD_DIR/world.mt.1st" #fi +if [ -z "$MT_MYGAME_DIR" ]; then + echo "You must have minetestenv.rc to provide MT_MYGAME_DIR and other variables." + exit 1 +fi + # BACKUP world.mt: if [ ! -d "$MT_MYGAME_DIR" ]; then mkdir "$MT_MYGAME_DIR" || customDie "$USER cannot mkdir '$MT_MYGAME_DIR' (make sure the directory containing it exists)" @@ -558,6 +564,10 @@ add_git_mod technic technic https://github.com/minetest-mods/technic.git add_git_mod technic_armor technic_armor https://github.com/stujones11/technic_armor.git # NOTE: load_mod is not a thing for subgames (all mods in subgame are loaded if subgame is loaded) + +# subterrane now requires mapgen_helper: +add_git_mod mapgen_helper mapgen_helper https://github.com/minetest-mods/mapgen_helper.git + #add_git_mod caverealms minetest-caverealms https://github.com/HeroOfTheWinds/minetest-caverealms # FaceDeer's caverealms REQUIRES subterrane: add_git_mod subterrane subterrane https://github.com/minetest-mods/subterrane.git @@ -1098,5 +1108,9 @@ elif [ -f "`command -v minetest`" ]; then else echo "WARNING: neither minetestserver nor minetest is in the system path" fi + +# if [ ! -z "`cat "$err_txt"`" ]; then +cat "$err_txt" +# fi echo echo