From d36abc1cbd9e7c5f3371f55c5b68f47e4ee3ef5b Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Sun, 29 Mar 2020 20:09:29 -0400 Subject: [PATCH] Prevent false detection of minetest as compiled. --- install-mts.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/install-mts.sh b/install-mts.sh index 1c8becc..108ca99 100755 --- a/install-mts.sh +++ b/install-mts.sh @@ -131,7 +131,16 @@ fi #exit 1 #fi enable_compile=true -if [ -d minetest ]; then +flag_mts="$extracted_path/minetest/bin/minetestserver" +flag_mt="$extracted_path/minetest/bin/minetest" +has_any_binary=false +if [ -f "$flag_mts" ]; then + has_any_binary=true +fi +if [ -f "$flag_mt" ]; then + has_any_binary=true +fi +if [ "@$has_any_binary" == "@true" ]; then enable_compile=false if [ "@$enable_client" = "@true" ]; then if [ ! -f minetest/bin/minetest ]; then @@ -146,7 +155,7 @@ if [ -d minetest ]; then fi fi else - echo "* enabling compile since missing `pwd`/minetest directory" + echo "* enabling compile since neither \"$flag_mts\" nor \"$flag_mt\" are present." fi if [ "@$enable_compile" = "@true" ]; then echo "* checking if the compile library script extracted the program source yet ($flag_dir)..."