From d67ddbe17beb6885dcdeeed4cbfc69b77c6e9e70 Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Fri, 21 Feb 2020 18:59:45 -0500 Subject: [PATCH] Fix pathing issue. --- build-minetest-here.sh | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/build-minetest-here.sh b/build-minetest-here.sh index 5c7ea5f..37304ac 100755 --- a/build-minetest-here.sh +++ b/build-minetest-here.sh @@ -1,5 +1,32 @@ #!/bin/bash +customDie(){ + echo "$1" + exit 1 +} +mybuild="minetest-built" +if [ ! -d $mybuild ]; then + # mkdir $mybuild + echo +fi +# cd $mybuild || customDie "$0: cd build failed in '`pwd`'." if [ -f bin/minetest ]; then - make clean + make clean || customDie "$0: make clean failed in '`pwd`'." +fi +RUN_IN_PLACE=0 +cmake . -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1 -DENABLE_REDIS=1 -DRUN_IN_PLACE=$RUN_IN_PLACE && make -j$(grep -c processor /proc/cpuinfo) || customDie "$0: Build failed in '`pwd`'." +echo +if [ "@$RUN_IN_PLACE" = "@1" ]; then + echo "WARNING: do not do make install with -DRUN_IN_PLACE=$RUN_IN_PLACE!" +fi +if [ "@$RUN_IN_PLACE" = "@true" ]; then + echo "WARNING: do not do make install with -DRUN_IN_PLACE=$RUN_IN_PLACE!" +fi +if [ "@$RUN_IN_PLACE" = "@on" ]; then + echo "WARNING: do not do make install with -DRUN_IN_PLACE=$RUN_IN_PLACE!" fi -cmake . -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1 -DENABLE_REDIS=1 -DRUN_IN_PLACE=1 && make -j$(grep -c processor /proc/cpuinfo) +echo +#/home/owner/git/EnlivenMinetest/install-minetest.sh says: +# NOTE: as long as -DRUN_IN_PLACE=off, above installs correctly without +# -DCMAKE_INSTALL_PREFIX=/usr which for some reason is used by +# https://aur.archlinux.org/minetest-git.git +